Hi everyone,
Im a new user in here and im trying to learn vba.
I have a form which i created throught vba, now im trying to add the code to it.
This form is opened by the user when he wants to add current data to the database.
I want to have a label with the current date on it, when the form is opened.
This is the code i tryied to modify:
Private Sub SellForm_Initialize()
' Dlbl is the date function
Dim Dlbl As Date
Dlbl = DateValue(Now)
Datelbl.Caption = Dlbl
End Sub
Well, As you can guess, it not working and the label's caption is empty....
What is wrong? Is this the right way to do it?
Thank you very much!
Bookmarks