Hi folks, I have created a function to check for future dates, but how do I make it generic.
I am assigning the function 'Before Update' on the textbox property.
I do not want to type each textbox name, any help much appreciated.
code below
Public Function CheckDate()
Dim myDate
myDate = textbox.Value
If myDate > Date Then
MsgBox "You've entered a future date", vbOKOnly, "Future Date"
Cancel = True
End If
End Function
I am assigning the function 'Before Update' on the textbox property.
I do not want to type each textbox name, any help much appreciated.
code below
Public Function CheckDate()
Dim myDate
myDate = textbox.Value
If myDate > Date Then
MsgBox "You've entered a future date", vbOKOnly, "Future Date"
Cancel = True
End If
End Function