-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdataform2.frm
More file actions
367 lines (344 loc) · 16.7 KB
/
dataform2.frm
File metadata and controls
367 lines (344 loc) · 16.7 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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
VERSION 5.00
Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} dataform
Caption = "Data Administration"
ClientHeight = 9585
ClientLeft = 45
ClientTop = 435
ClientWidth = 10050
OleObjectBlob = "dataform2.frx":0000
StartUpPosition = 1 'CenterOwner
End
Attribute VB_Name = "dataform"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub cancelbutton_Click()
Unload Me
End Sub
Private Sub okbutton_Click()
Dim datee As String, datef As String, dateg As String, dateh As String, datei As String, datej As String
Dim datek As String, datel As String, datem As String, daten As String, dateo As String, datep As String
Dim dateq As String, dater As String, dates As String, datet As String, dateu As String, datev As String
Dim datew As String, datex As String, datey As String, datez As String, dateaa As String, dateab As String
Dim dateac As String, datead As String, dateae As String, dateaf As String, dateag As String, dateah As String
Dim dateai As String, dateaj As String, dateak As String, dateal As String, dateam As String, datean As String
Dim dateao As String, dateap As String, a As Integer, fname As String, sname As String, role As String, sdate As Date
a = ActiveCell.Row
Cells(a, 1).Value = dataform.fname.Value
Cells(a, 2).Value = dataform.sname.Value
Cells(a, 3).Value = dataform.role.Value
Cells(a, 4).Value = dataform.sdate.Value
Cells(a, 4) = Format(Cells(a, 4), "dd/mm/yy")
Cells(a, 5).Value = dataform.datee.Value
Cells(a, 5) = Format(Cells(a, 5), "dd/mm/yy")
Cells(a, 6).Value = dataform.datef.Value
Cells(a, 6) = Format(Cells(a, 6), "dd/mm/yy")
Cells(a, 7).Value = dataform.dateg.Value
Cells(a, 7) = Format(Cells(a, 7), "dd/mm/yy")
Cells(a, 8).Value = dataform.dateh.Value
Cells(a, 8) = Format(Cells(a, 8), "dd/mm/yy")
Cells(a, 9).Value = dataform.datei.Value
Cells(a, 9) = Format(Cells(a, 9), "dd/mm/yy")
Cells(a, 10).Value = dataform.datej.Value
Cells(a, 10) = Format(Cells(a, 10), "dd/mm/yy")
Cells(a, 11).Value = dataform.datek.Value
Cells(a, 11) = Format(Cells(a, 11), "dd/mm/yy")
Cells(a, 12).Value = dataform.datel.Value
Cells(a, 12) = Format(Cells(a, 12), "dd/mm/yy")
Cells(a, 13).Value = dataform.datem.Value
Cells(a, 13) = Format(Cells(a, 13), "dd/mm/yy")
Cells(a, 14).Value = dataform.daten.Value
Cells(a, 14) = Format(Cells(a, 14), "dd/mm/yy")
Cells(a, 15).Value = dataform.dateo.Value
Cells(a, 15) = Format(Cells(a, 15), "dd/mm/yy")
Cells(a, 16).Value = dataform.datep.Value
Cells(a, 16) = Format(Cells(a, 16), "dd/mm/yy")
Cells(a, 17).Value = dataform.dateq.Value
Cells(a, 17) = Format(Cells(a, 17), "dd/mm/yy")
Cells(a, 18).Value = dataform.dater.Value
Cells(a, 18) = Format(Cells(a, 18), "dd/mm/yy")
Cells(a, 19).Value = dataform.dates.Value
Cells(a, 19) = Format(Cells(a, 19), "dd/mm/yy")
Cells(a, 20).Value = dataform.datet.Value
Cells(a, 20) = Format(Cells(a, 20), "dd/mm/yy")
Cells(a, 21).Value = dataform.dateu.Value
Cells(a, 21) = Format(Cells(a, 21), "dd/mm/yy")
Cells(a, 22).Value = dataform.datev.Value
Cells(a, 22) = Format(Cells(a, 22), "dd/mm/yy")
Cells(a, 23).Value = dataform.datew.Value
Cells(a, 23) = Format(Cells(a, 23), "dd/mm/yy")
Cells(a, 24).Value = dataform.datex.Value
Cells(a, 24) = Format(Cells(a, 24), "dd/mm/yy")
Cells(a, 25).Value = dataform.datey.Value
Cells(a, 25) = Format(Cells(a, 25), "dd/mm/yy")
Cells(a, 26).Value = dataform.datez.Value
Cells(a, 26) = Format(Cells(a, 26), "dd/mm/yy")
Cells(a, 27).Value = dataform.dateaa.Value
Cells(a, 27) = Format(Cells(a, 27), "dd/mm/yy")
Cells(a, 28).Value = dataform.dateab.Value
Cells(a, 28) = Format(Cells(a, 28), "dd/mm/yy")
Cells(a, 29).Value = dataform.dateac.Value
Cells(a, 29) = Format(Cells(a, 29), "dd/mm/yy")
Cells(a, 30).Value = dataform.datead.Value
Cells(a, 30) = Format(Cells(a, 30), "dd/mm/yy")
Cells(a, 31).Value = dataform.dateae.Value
Cells(a, 31) = Format(Cells(a, 31), "dd/mm/yy")
Cells(a, 32).Value = dataform.dateaf.Value
Cells(a, 32) = Format(Cells(a, 32), "dd/mm/yy")
Cells(a, 33).Value = dataform.dateag.Value
Cells(a, 33) = Format(Cells(a, 33), "dd/mm/yy")
Cells(a, 34).Value = dataform.dateah.Value
Cells(a, 34) = Format(Cells(a, 34), "dd/mm/yy")
Cells(a, 35).Value = dataform.dateai.Value
Cells(a, 35) = Format(Cells(a, 35), "dd/mm/yy")
Cells(a, 36).Value = dataform.dateaj.Value
Cells(a, 36) = Format(Cells(a, 36), "dd/mm/yy")
Cells(a, 37).Value = dataform.dateak.Value
Cells(a, 37) = Format(Cells(a, 37), "dd/mm/yy")
Cells(a, 38).Value = dataform.dateal.Value
Cells(a, 38) = Format(Cells(a, 38), "dd/mm/yy")
Cells(a, 39).Value = dataform.dateam.Value
Cells(a, 39) = Format(Cells(a, 39), "dd/mm/yy")
Cells(a, 40).Value = dataform.datean.Value
Cells(a, 40) = Format(Cells(a, 40), "dd/mm/yy")
Cells(a, 41).Value = dataform.dateao.Value
Cells(a, 41) = Format(Cells(a, 41), "dd/mm/yy")
Cells(a, 42).Value = dataform.dateap.Value
Cells(a, 42) = Format(Cells(a, 42), "dd/mm/yy")
Unload Me
End Sub
Private Sub searchbutton_Click()
FormatDateTime (Date = [vbShortDate])
Dim datee As String, datef As String, dateg As String, dateh As String, datei As String, datej As String
Dim datek As String, datel As String, datem As String, daten As String, dateo As String, datep As String
Dim dateq As String, dater As String, dates As String, datet As String, dateu As String, datev As String
Dim datew As String, datex As String, datey As String, datez As String, dateaa As String, dateab As String
Dim dateac As String, datead As String, dateae As String, dateaf As String, dateag As String, dateah As String
Dim dateai As String, dateaj As String, dateak As String, dateal As String, dateam As String, datean As String
Dim dateao As String, dateap As String, a As Integer, fname As String, sname As String, role As String, sdate As Date
On Error Resume Next
ActiveSheet.Cells.Find(what:=dataform.searchbox.Value, after:=ActiveCell, LookIn:=xlValues, lookat:=xlPart, _
searchorder:=xlByRows, searchdirection:=xlNext, MatchCase:=False, searchformat:=False).Activate
a = ActiveCell.Row
dataform.fname.Value = Cells(a, 1).Value
dataform.sname.Value = Cells(a, 2).Value
dataform.role.Value = Cells(a, 3).Value
dataform.sdate.Value = Cells(a, 4).Value
dataform.sdate = Format(dataform.sdate, "dd/mm/yy")
dataform.datee.Value = Cells(a, 5).Value
dataform.datee = Format(dataform.datee, "dd/mm/yy")
dataform.datef.Value = Cells(a, 6).Value
dataform.datef = Format(dataform.datef, "dd/mm/yy")
dataform.dateg.Value = Cells(a, 7).Value
dataform.dateg = Format(dataform.dateg, "dd/mm/yy")
dataform.dateh.Value = Cells(a, 8).Value
dataform.dateh = Format(dataform.dateh, "dd/mm/yy")
dataform.datei.Value = Cells(a, 9).Value
dataform.datei = Format(dataform.datei, "dd/mm/yy")
dataform.datej.Value = Cells(a, 10).Value
dataform.datej = Format(dataform.datej, "dd/mm/yy")
dataform.datek.Value = Cells(a, 11).Value
dataform.datek = Format(dataform.datek, "dd/mm/yy")
dataform.datel.Value = Cells(a, 12).Value
dataform.datel = Format(dataform.datel, "dd/mm/yy")
dataform.datem.Value = Cells(a, 13).Value
dataform.datem = Format(dataform.datem, "dd/mm/yy")
dataform.daten.Value = Cells(a, 14).Value
dataform.daten = Format(dataform.daten, "dd/mm/yy")
dataform.dateo.Value = Cells(a, 15).Value
dataform.dateo = Format(dataform.dateo, "dd/mm/yy")
dataform.datep.Value = Cells(a, 16).Value
dataform.datep = Format(dataform.datep, "dd/mm/yy")
dataform.dateq.Value = Cells(a, 17).Value
dataform.dateq = Format(dataform.dateq, "dd/mm/yy")
dataform.dater.Value = Cells(a, 18).Value
dataform.dater = Format(dataform.dater, "dd/mm/yy")
dataform.dates.Value = Cells(a, 19).Value
dataform.dates = Format(dataform.dates, "dd/mm/yy")
dataform.datet.Value = Cells(a, 20).Value
dataform.datet = Format(dataform.datet, "dd/mm/yy")
dataform.dateu.Value = Cells(a, 21).Value
dataform.dateu = Format(dataform.dateu, "dd/mm/yy")
dataform.datev.Value = Cells(a, 22).Value
dataform.datev = Format(dataform.datev, "dd/mm/yy")
dataform.datew.Value = Cells(a, 23).Value
dataform.datew = Format(dataform.datew, "dd/mm/yy")
dataform.datex.Value = Cells(a, 24).Value
dataform.datex = Format(dataform.datex, "dd/mm/yy")
dataform.datey.Value = Cells(a, 25).Value
dataform.datey = Format(dataform.datey, "dd/mm/yy")
dataform.datez.Value = Cells(a, 26).Value
dataform.datez = Format(dataform.datez, "dd/mm/yy")
dataform.dateaa.Value = Cells(a, 27).Value
dataform.dateaa = Format(dataform.dateaa, "dd/mm/yy")
dataform.dateab.Value = Cells(a, 28).Value
dataform.dateab = Format(dataform.dateab, "dd/mm/yy")
dataform.dateac.Value = Cells(a, 29).Value
dataform.dateac = Format(dataform.dateac, "dd/mm/yy")
dataform.datead.Value = Cells(a, 30).Value
dataform.datead = Format(dataform.datead, "dd/mm/yy")
dataform.dateae.Value = Cells(a, 31).Value
dataform.dateae = Format(dataform.dateae, "dd/mm/yy")
dataform.dateaf.Value = Cells(a, 32).Value
dataform.dateaf = Format(dataform.dateaf, "dd/mm/yy")
dataform.dateag.Value = Cells(a, 33).Value
dataform.dateag = Format(dataform.dateag, "dd/mm/yy")
dataform.dateah.Value = Cells(a, 34).Value
dataform.dateah = Format(dataform.dateah, "dd/mm/yy")
dataform.dateai.Value = Cells(a, 35).Value
dataform.dateai = Format(dataform.dateai, "dd/mm/yy")
dataform.dateaj.Value = Cells(a, 36).Value
dataform.dateaj = Format(dataform.dateaj, "dd/mm/yy")
dataform.dateak.Value = Cells(a, 37).Value
dataform.dateak = Format(dataform.dateak, "dd/mm/yy")
dataform.dateal.Value = Cells(a, 38).Value
dataform.dateal = Format(dataform.dateal, "dd/mm/yy")
dataform.dateam.Value = Cells(a, 39).Value
dataform.dateam = Format(dataform.dateam, "dd/mm/yy")
dataform.datean.Value = Cells(a, 40).Value
dataform.datean = Format(dataform.datean, "dd/mm/yy")
dataform.dateao.Value = Cells(a, 41).Value
dataform.dateao = Format(dataform.dateao, "dd/mm/yy")
dataform.dateap.Value = Cells(a, 42).Value
dataform.dateap = Format(dataform.dateap, "dd/mm/yy")
End Sub
Private Sub submitbutton_Click()
Dim datee As String, datef As String, dateg As String, dateh As String, datei As String, datej As String
Dim datek As String, datel As String, datem As String, daten As String, dateo As String, datep As String
Dim dateq As String, dater As String, dates As String, datet As String, dateu As String, datev As String
Dim datew As String, datex As String, datey As String, datez As String, dateaa As String, dateab As String
Dim dateac As String, datead As String, dateae As String, dateaf As String, dateag As String, dateah As String
Dim dateai As String, dateaj As String, dateak As String, dateal As String, dateam As String, datean As String
Dim dateao As String, dateap As String, a As Integer, fname As String, sname As String, role As String, sdate As Date
a = ActiveCell.Row
Cells(a, 1).Value = dataform.fname.Value
Cells(a, 2).Value = dataform.sname.Value
Cells(a, 3).Value = dataform.role.Value
Cells(a, 4).Value = dataform.sdate.Value
Cells(a, 4) = Format(Cells(a, 4), "dd/mm/yy")
Cells(a, 5).Value = dataform.datee.Value
Cells(a, 5) = Format(Cells(a, 5), "dd/mm/yy")
Cells(a, 6).Value = dataform.datef.Value
Cells(a, 6) = Format(Cells(a, 6), "dd/mm/yy")
Cells(a, 7).Value = dataform.dateg.Value
Cells(a, 7) = Format(Cells(a, 7), "dd/mm/yy")
Cells(a, 8).Value = dataform.dateh.Value
Cells(a, 8) = Format(Cells(a, 8), "dd/mm/yy")
Cells(a, 9).Value = dataform.datei.Value
Cells(a, 9) = Format(Cells(a, 9), "dd/mm/yy")
Cells(a, 10).Value = dataform.datej.Value
Cells(a, 10) = Format(Cells(a, 10), "dd/mm/yy")
Cells(a, 11).Value = dataform.datek.Value
Cells(a, 11) = Format(Cells(a, 11), "dd/mm/yy")
Cells(a, 12).Value = dataform.datel.Value
Cells(a, 12) = Format(Cells(a, 12), "dd/mm/yy")
Cells(a, 13).Value = dataform.datem.Value
Cells(a, 13) = Format(Cells(a, 13), "dd/mm/yy")
Cells(a, 14).Value = dataform.daten.Value
Cells(a, 14) = Format(Cells(a, 14), "dd/mm/yy")
Cells(a, 15).Value = dataform.dateo.Value
Cells(a, 15) = Format(Cells(a, 15), "dd/mm/yy")
Cells(a, 16).Value = dataform.datep.Value
Cells(a, 16) = Format(Cells(a, 16), "dd/mm/yy")
Cells(a, 17).Value = dataform.dateq.Value
Cells(a, 17) = Format(Cells(a, 17), "dd/mm/yy")
Cells(a, 18).Value = dataform.dater.Value
Cells(a, 18) = Format(Cells(a, 18), "dd/mm/yy")
Cells(a, 19).Value = dataform.dates.Value
Cells(a, 19) = Format(Cells(a, 19), "dd/mm/yy")
Cells(a, 20).Value = dataform.datet.Value
Cells(a, 20) = Format(Cells(a, 20), "dd/mm/yy")
Cells(a, 21).Value = dataform.dateu.Value
Cells(a, 21) = Format(Cells(a, 21), "dd/mm/yy")
Cells(a, 22).Value = dataform.datev.Value
Cells(a, 22) = Format(Cells(a, 22), "dd/mm/yy")
Cells(a, 23).Value = dataform.datew.Value
Cells(a, 23) = Format(Cells(a, 23), "dd/mm/yy")
Cells(a, 24).Value = dataform.datex.Value
Cells(a, 24) = Format(Cells(a, 24), "dd/mm/yy")
Cells(a, 25).Value = dataform.datey.Value
Cells(a, 25) = Format(Cells(a, 25), "dd/mm/yy")
Cells(a, 26).Value = dataform.datez.Value
Cells(a, 26) = Format(Cells(a, 26), "dd/mm/yy")
Cells(a, 27).Value = dataform.dateaa.Value
Cells(a, 27) = Format(Cells(a, 27), "dd/mm/yy")
Cells(a, 28).Value = dataform.dateab.Value
Cells(a, 28) = Format(Cells(a, 28), "dd/mm/yy")
Cells(a, 29).Value = dataform.dateac.Value
Cells(a, 29) = Format(Cells(a, 29), "dd/mm/yy")
Cells(a, 30).Value = dataform.datead.Value
Cells(a, 30) = Format(Cells(a, 30), "dd/mm/yy")
Cells(a, 31).Value = dataform.dateae.Value
Cells(a, 31) = Format(Cells(a, 31), "dd/mm/yy")
Cells(a, 32).Value = dataform.dateaf.Value
Cells(a, 32) = Format(Cells(a, 32), "dd/mm/yy")
Cells(a, 33).Value = dataform.dateag.Value
Cells(a, 33) = Format(Cells(a, 33), "dd/mm/yy")
Cells(a, 34).Value = dataform.dateah.Value
Cells(a, 34) = Format(Cells(a, 34), "dd/mm/yy")
Cells(a, 35).Value = dataform.dateai.Value
Cells(a, 35) = Format(Cells(a, 35), "dd/mm/yy")
Cells(a, 36).Value = dataform.dateaj.Value
Cells(a, 36) = Format(Cells(a, 36), "dd/mm/yy")
Cells(a, 37).Value = dataform.dateak.Value
Cells(a, 37) = Format(Cells(a, 37), "dd/mm/yy")
Cells(a, 38).Value = dataform.dateal.Value
Cells(a, 38) = Format(Cells(a, 38), "dd/mm/yy")
Cells(a, 39).Value = dataform.dateam.Value
Cells(a, 39) = Format(Cells(a, 39), "dd/mm/yy")
Cells(a, 40).Value = dataform.datean.Value
Cells(a, 40) = Format(Cells(a, 40), "dd/mm/yy")
Cells(a, 41).Value = dataform.dateao.Value
Cells(a, 41) = Format(Cells(a, 41), "dd/mm/yy")
Cells(a, 42).Value = dataform.dateap.Value
Cells(a, 42) = Format(Cells(a, 42), "dd/mm/yy")
End Sub
Private Sub userform_Initialize()
Dim namee As String, namef As String, nameg As String, nameh As String, namei As String, namej As String
Dim namek As String, namel As String, namem As String, namen As String, nameo As String, namep As String
Dim nameq As String, namer As String, names As String, namet As String, nameu As String, namev As String
Dim namew As String, namex As String, namey As String, namez As String, nameaa As String, nameab As String
Dim nameac As String, namead As String, nameae As String, nameaf As String, nameag As String, nameah As String
Dim nameai As String, nameaj As String, nameak As String, nameal As String, nameam As String, namean As String
Dim nameao As String, nameap As String
dataform.namee.Value = Cells(2, 5).Value
dataform.namef.Value = Cells(2, 6).Value
dataform.nameg.Value = Cells(2, 7).Value
dataform.nameh.Value = Cells(2, 8).Value
dataform.namei.Value = Cells(2, 9).Value
dataform.namej.Value = Cells(2, 10).Value
dataform.namek.Value = Cells(2, 11).Value
dataform.namel.Value = Cells(2, 12).Value
dataform.namem.Value = Cells(2, 13).Value
dataform.namen.Value = Cells(2, 14).Value
dataform.nameo.Value = Cells(2, 15).Value
dataform.namep.Value = Cells(2, 16).Value
dataform.nameq.Value = Cells(2, 17).Value
dataform.namer.Value = Cells(2, 18).Value
dataform.names.Value = Cells(2, 19).Value
dataform.namet.Value = Cells(2, 20).Value
dataform.nameu.Value = Cells(2, 21).Value
dataform.namev.Value = Cells(2, 22).Value
dataform.namew.Value = Cells(2, 23).Value
dataform.namex.Value = Cells(2, 24).Value
dataform.namey.Value = Cells(2, 25).Value
dataform.namez.Value = Cells(2, 26).Value
dataform.nameaa.Value = Cells(2, 27).Value
dataform.nameab.Value = Cells(2, 28).Value
dataform.nameac.Value = Cells(2, 29).Value
dataform.namead.Value = Cells(2, 30).Value
dataform.nameae.Value = Cells(2, 31).Value
dataform.nameaf.Value = Cells(2, 32).Value
dataform.nameag.Value = Cells(2, 33).Value
dataform.nameah.Value = Cells(2, 34).Value
dataform.nameai.Value = Cells(2, 35).Value
dataform.nameaj.Value = Cells(2, 36).Value
dataform.nameak.Value = Cells(2, 37).Value
dataform.nameal.Value = Cells(2, 38).Value
dataform.nameam.Value = Cells(2, 39).Value
dataform.namean.Value = Cells(2, 40).Value
dataform.nameao.Value = Cells(2, 41).Value
dataform.nameap.Value = Cells(2, 42).Value
End Sub