-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathld forms code.txt
More file actions
206 lines (185 loc) · 6.4 KB
/
ld forms code.txt
File metadata and controls
206 lines (185 loc) · 6.4 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
Private Sub Workbook_Open()
'cancelform.Visible = xlSheetHidden
'courseform.Visible = xlSheetHidden
coursenames.Visible = xlSheetHidden
'externalform.Visible = xlSheetHidden
'onrequest.Visible = xlSheetHidden
'substituteform.Visible = xlSheetHidden
'trainerrecharge.Visible = xlSheetHidden
'home.Visible = xlSheetVisible
'home.Activate
'
'home.Range("A1").Select
End Sub
Sub mail_bookingform()
home.Visible = xlSheetHidden
Application.Dialogs(xlDialogSendMail).Show "PeopleCentre.UK@Sodexo.com", "L and D team: Course booking form"
End Sub
Sub mail_externalform()
home.Visible = xlSheetHidden
Application.Dialogs(xlDialogSendMail).Show "PeopleCentre.UK@Sodexo.com", "L and D team: External training request"
End Sub
Sub mail_substitueform()
home.Visible = xlSheetHidden
Application.Dialogs(xlDialogSendMail).Show "PeopleCentre.UK@Sodexo.com", "L and D team: Course substitution form"
End Sub
Sub mail_cancelform()
home.Visible = xlSheetHidden
Application.Dialogs(xlDialogSendMail).Show "PeopleCentre.UK@Sodexo.com", "L and D team: Course booking cancellation form"
End Sub
Sub mail_onrequestform()
home.Visible = xlSheetHidden
trainerrecharge.Visible = xlSheetVisible
Application.Dialogs(xlDialogSendMail).Show "PeopleCentre.UK@Sodexo.com", "L and D team: On Request training form"
End Sub
Sub mail_academyform()
If academyform.Range("b11") = "" Then
MsgBox "Please select the academy name you are nominating for", vbOKOnly, "Error"
academyform.Range("b11").Select
academyform.Range("a11").Font.Color = RGB(255, 0, 0)
Exit Sub
End If
home.Visible = xlSheetHidden
academyform.Visible = xlSheetVisible
If academyform.Range("b11") = "Supervisor Academy" Then
Application.Dialogs(xlDialogSendMail).Show "PeopleCentre.UK@Sodexo.com", "L and D team: Supervisor Academy Nomination form"
Else
Application.Dialogs(xlDialogSendMail).Show "PeopleCentre.UK@Sodexo.com", "L and D team: Unidentified Academy Nomination form"
End If
End Sub
Sub admin_reveal()
'shortcut is Shift+ctrl+A
cancelform.Visible = xlSheetVisible
courseform.Visible = xlSheetVisible
externalform.Visible = xlSheetVisible
onrequest.Visible = xlSheetVisible
substituteform.Visible = xlSheetVisible
trainerrecharge.Visible = xlSheetVisible
ordelegates.Visible = xlSheetVisible
home.Visible = xlSheetVisible
academyform.Visible = xlSheetVisible
End Sub
Sub masteruser_show()
'shortcut is Shift+Ctrl+M
cancelform.Visible = xlSheetVisible
courseform.Visible = xlSheetVisible
coursenames.Visible = xlSheetVisible
externalform.Visible = xlSheetVisible
onrequest.Visible = xlSheetVisible
substituteform.Visible = xlSheetVisible
trainerrecharge.Visible = xlSheetVisible
ordelegates.Visible = xlSheetVisible
academyform.Visible = xlSheetVisible
home.Visible = xlSheetVisible
End Sub
Sub masteruser_hide()
'shortcut is Shift+Ctrl+N
cancelform.Visible = xlSheetHidden
courseform.Visible = xlSheetHidden
coursenames.Visible = xlSheetHidden
externalform.Visible = xlSheetHidden
onrequest.Visible = xlSheetHidden
substituteform.Visible = xlSheetHidden
trainerrecharge.Visible = xlSheetHidden
ordelegates.Visible = xlSheetHidden
academyform.Visible = xlSheetHidden
home.Visible = xlSheetVisible
End Sub
Private Sub academybutton_Click()
cancelform.Visible = xlSheetHidden
courseform.Visible = xlSheetHidden
coursenames.Visible = xlSheetHidden
externalform.Visible = xlSheetHidden
onrequest.Visible = xlSheetHidden
substituteform.Visible = xlSheetHidden
trainerrecharge.Visible = xlSheetHidden
ordelegates.Visible = xlSheetHidden
academyform.Visible = xlSheetVisible
home.Visible = xlSheetVisible
academyform.Activate
academyform.Range("B4").Select
End Sub
Private Sub adminbutton_Click()
cancelform.Visible = xlSheetHidden
courseform.Visible = xlSheetHidden
coursenames.Visible = xlSheetHidden
externalform.Visible = xlSheetHidden
onrequest.Visible = xlSheetHidden
substituteform.Visible = xlSheetHidden
academyform.Visible = xlSheetHidden
ordelegates.Visible = xlSheetVisible
trainerrecharge.Visible = xlSheetVisible
home.Visible = xlSheetVisible
trainerrecharge.Activate
trainerrecharge.Range("E2").Select
End Sub
Private Sub bookformbutton_Click()
cancelform.Visible = xlSheetHidden
courseform.Visible = xlSheetVisible
coursenames.Visible = xlSheetHidden
externalform.Visible = xlSheetHidden
onrequest.Visible = xlSheetHidden
substituteform.Visible = xlSheetHidden
trainerrecharge.Visible = xlSheetHidden
ordelegates.Visible = xlSheetHidden
academyform.Visible = xlSheetHidden
home.Visible = xlSheetVisible
courseform.Activate
courseform.Range("A5").Select
End Sub
Private Sub Cancelbutton_Click()
cancelform.Visible = xlSheetVisible
courseform.Visible = xlSheetHidden
coursenames.Visible = xlSheetHidden
externalform.Visible = xlSheetHidden
onrequest.Visible = xlSheetHidden
ordelegates.Visible = xlSheetHidden
substituteform.Visible = xlSheetHidden
trainerrecharge.Visible = xlSheetHidden
academyform.Visible = xlSheetHidden
home.Visible = xlSheetVisible
cancelform.Activate
cancelform.Range("A5").Select
End Sub
Private Sub externalbutton_Click()
cancelform.Visible = xlSheetHidden
courseform.Visible = xlSheetHidden
coursenames.Visible = xlSheetHidden
externalform.Visible = xlSheetVisible
onrequest.Visible = xlSheetHidden
ordelegates.Visible = xlSheetHidden
substituteform.Visible = xlSheetHidden
trainerrecharge.Visible = xlSheetHidden
academyform.Visible = xlSheetHidden
home.Visible = xlSheetVisible
externalform.Activate
externalform.Range("B4").Select
End Sub
Private Sub onrequestbutton_Click()
cancelform.Visible = xlSheetHidden
courseform.Visible = xlSheetHidden
coursenames.Visible = xlSheetHidden
externalform.Visible = xlSheetHidden
onrequest.Visible = xlSheetVisible
ordelegates.Visible = xlSheetVisible
substituteform.Visible = xlSheetHidden
trainerrecharge.Visible = xlSheetHidden
academyform.Visible = xlSheetHidden
home.Visible = xlSheetVisible
onrequest.Activate
onrequest.Range("e17").Select
End Sub
Private Sub Subbutton_Click()
cancelform.Visible = xlSheetHidden
courseform.Visible = xlSheetHidden
coursenames.Visible = xlSheetHidden
externalform.Visible = xlSheetHidden
onrequest.Visible = xlSheetHidden
ordelegates.Visible = xlSheetHidden
substituteform.Visible = xlSheetVisible
trainerrecharge.Visible = xlSheetHidden
academyform.Visible = xlSheetHidden
home.Visible = xlSheetVisible
substituteform.Activate
substituteform.Range("A5").Select
End Sub