B
Basta1980
Hi all,
Trying to create an userform. I'm testing if the userform works
accordingley, needless to say it doesn't. Below is the code I use. Thing is I
always get an 'invalid qualifier' when it comes ot fields containing dates
(i.e. tbCreationDate). What do I have to do get these dates working?!
Private Sub CommandButton2_Click()
Dim tbCreationDate As Date
Dim TB2ndcheck As Date
Dim tbFinConDate As Date
Dim tbMgt As Date
Dim tbRetour As Date
Dim tbGroup As Date
Dim tbCFOCEO As Date
Dim tbRetourCompleet As Date
Dim tbVerwerktSystemen As Date
'Determine next empty line
NewRow = Worksheets("Operational Credit").Range("A20000").End(xlUp).Row
+ 1
'Fill in data
Worksheets("Operational Credit").Cells(NewRow, 1).Value =
tbAanvrager.Value
Worksheets("Operational Credit").Cells(NewRow, 2).Value =
tbVeroorzaker.Value
Worksheets("Operational Credit").Cells(NewRow, 3).Value = tbMinuten.Value
Worksheets("Operational Credit").Cells(NewRow, 4).Value = tbBedrijf.Value
Worksheets("Operational Credit").Cells(NewRow, 5).Value = tbBan.Value
Worksheets("Operational Credit").Cells(NewRow, 6).Value = tbBedrag.Value
Worksheets("Operational Credit").Cells(NewRow, 7).Value = tbCreationDate
Worksheets("Operational Credit").Cells(NewRow, 8).Value = cbOorzaak.Value
Worksheets("Operational Credit").Cells(NewRow, 9).Value =
tbCorrectieActie.Text
Worksheets("Operational Credit").Cells(NewRow, 10).Value = cbCheckFC.Value
Worksheets("Operational Credit").Cells(NewRow, 11).Value =
TB2ndcheck.Value
Worksheets("Operational Credit").Cells(NewRow, 12).Value =
tbFinConDate.Value
Worksheets("Operational Credit").Cells(NewRow, 13).Value = tbMgt.Value
Worksheets("Operational Credit").Cells(NewRow, 14).Value = tbRetour.Value
Worksheets("Operational Credit").Cells(NewRow, 15).Value = tbGroup.Value
Worksheets("Operational Credit").Cells(NewRow, 16).Value = tbCFOCEO.Value
Worksheets("Operational Credit").Cells(NewRow, 17).Value =
tbRetourCompleet.Value
Worksheets("Operational Credit").Cells(NewRow, 18).Value =
tbVerwerktSystemen.Value
Worksheets("Operational Credit").Cells(NewRow, 18).Value =
tbOpmerkingFC.Text
tbAanvrager.SetFocus
End Sub
Regards,
Basta
Trying to create an userform. I'm testing if the userform works
accordingley, needless to say it doesn't. Below is the code I use. Thing is I
always get an 'invalid qualifier' when it comes ot fields containing dates
(i.e. tbCreationDate). What do I have to do get these dates working?!
Private Sub CommandButton2_Click()
Dim tbCreationDate As Date
Dim TB2ndcheck As Date
Dim tbFinConDate As Date
Dim tbMgt As Date
Dim tbRetour As Date
Dim tbGroup As Date
Dim tbCFOCEO As Date
Dim tbRetourCompleet As Date
Dim tbVerwerktSystemen As Date
'Determine next empty line
NewRow = Worksheets("Operational Credit").Range("A20000").End(xlUp).Row
+ 1
'Fill in data
Worksheets("Operational Credit").Cells(NewRow, 1).Value =
tbAanvrager.Value
Worksheets("Operational Credit").Cells(NewRow, 2).Value =
tbVeroorzaker.Value
Worksheets("Operational Credit").Cells(NewRow, 3).Value = tbMinuten.Value
Worksheets("Operational Credit").Cells(NewRow, 4).Value = tbBedrijf.Value
Worksheets("Operational Credit").Cells(NewRow, 5).Value = tbBan.Value
Worksheets("Operational Credit").Cells(NewRow, 6).Value = tbBedrag.Value
Worksheets("Operational Credit").Cells(NewRow, 7).Value = tbCreationDate
Worksheets("Operational Credit").Cells(NewRow, 8).Value = cbOorzaak.Value
Worksheets("Operational Credit").Cells(NewRow, 9).Value =
tbCorrectieActie.Text
Worksheets("Operational Credit").Cells(NewRow, 10).Value = cbCheckFC.Value
Worksheets("Operational Credit").Cells(NewRow, 11).Value =
TB2ndcheck.Value
Worksheets("Operational Credit").Cells(NewRow, 12).Value =
tbFinConDate.Value
Worksheets("Operational Credit").Cells(NewRow, 13).Value = tbMgt.Value
Worksheets("Operational Credit").Cells(NewRow, 14).Value = tbRetour.Value
Worksheets("Operational Credit").Cells(NewRow, 15).Value = tbGroup.Value
Worksheets("Operational Credit").Cells(NewRow, 16).Value = tbCFOCEO.Value
Worksheets("Operational Credit").Cells(NewRow, 17).Value =
tbRetourCompleet.Value
Worksheets("Operational Credit").Cells(NewRow, 18).Value =
tbVerwerktSystemen.Value
Worksheets("Operational Credit").Cells(NewRow, 18).Value =
tbOpmerkingFC.Text
tbAanvrager.SetFocus
End Sub
Regards,
Basta