R
RyanH
I have a Userform with several DTPickers. Next to each DTPicker is a
checkbox. This is how I relate the checkbox and dtpicker, Checkbox1.Value =
DTPicker1.Visible.
How can I set the DTPickers date to todays date when the userform is
intialized? Currently the date is the date I added it to the userform. This
is what I use to get around it.
Sub Userform_Initialize()
' set all dtp controls to todays date,
' if the DTPicker is not visible and you try to set the date you get
an error
For Each dtp In colDueDates
With dtp
If .Visible = False Then
.Visible = True
.Value = Date
.Visible = False
End If
End With
Next dtp
End Sub
checkbox. This is how I relate the checkbox and dtpicker, Checkbox1.Value =
DTPicker1.Visible.
How can I set the DTPickers date to todays date when the userform is
intialized? Currently the date is the date I added it to the userform. This
is what I use to get around it.
Sub Userform_Initialize()
' set all dtp controls to todays date,
' if the DTPicker is not visible and you try to set the date you get
an error
For Each dtp In colDueDates
With dtp
If .Visible = False Then
.Visible = True
.Value = Date
.Visible = False
End If
End With
Next dtp
End Sub