-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfrmSelectDestinations.frm
More file actions
64 lines (59 loc) · 2.12 KB
/
Copy pathfrmSelectDestinations.frm
File metadata and controls
64 lines (59 loc) · 2.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
VERSION 5.00
Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} frmSelectDestinations
ClientHeight = 9295.001
ClientLeft = 39
ClientTop = 325
ClientWidth = 10660
OleObjectBlob = "frmSelectDestinations.frx":0000
StartUpPosition = 1 'CenterOwner
End
Attribute VB_Name = "frmSelectDestinations"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub cmdCancel_Click()
Me.Hide
MsgBox "At your request, quitting.", , sThisProgram
End
End Sub
Public Sub cmdSelectDestinations_Click()
Dim i As Integer
With Me
For i = 0 To .lstFolders.ListCount - 1
If .lstFolders.Selected(i) Then
' Button exits Form only if something selected.
.Hide
boolSelectionMade = True
Exit Sub
End If
Next
If boolSelectionMade = False Then .cmdSelectDestinations.Caption = "Select something, Doofus."
End With
End Sub
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
' Make clicking the red X Close button in the top right corner the same as pressing the Cancel button.
cmdCancel_Click
End Sub
Private Sub cmdDefaultDestinations_Click()
Dim i As Integer, j As Integer
' List of default contact groups to put new email addresses into.
Const numDefaults As Integer = 1
Dim sDefaults(numDefaults - 1) As String
sDefaults(0) = "Yadda Yadda"
' End of list
With Me.lstFolders
' Check each folder/contact group listed in this form.
For i = 0 To .ListCount - 1
.Selected(i) = False
' If this contact group is a default contact group...
For j = 0 To numDefaults - 1
If LCase$(.List(i, 2)) = LCase$(sDefaults(j)) Then
.Selected(i) = True ' ... Select it and ...
Exit For ' ... Go to the next folder/contact group.
End If
Next
Next
End With
End Sub