...

View Full Version : Visual Basic Help: Need date to automatically appear in text box...



mayer1508
09-18-2007, 08:45 AM
Hey There

I am relitivly new (very new!) to Vb. Have created some simple forms for an excel file.

One of the text boxes is for the user to enter the current date. I simply want the current date to automatically appear there. Tried a reply to this on another thread (glenn's responce) and cant seem to get it to work. Have looked everywhere!

Any help would be creately appreciated.

Currently the code for that specific text box looks like this:

Private Sub Dates2_Change()
Format "dd/MM/yyyy"
End Sub

Any help???????????????/

Mick

PS: hope i put this thread in the correct catagory...This time!!!

Roelf
09-18-2007, 12:08 PM
Hey There

I am relitivly new (very new!) to Vb. Have created some simple forms for an excel file.

One of the text boxes is for the user to enter the current date. I simply want the current date to automatically appear there. Tried a reply to this on another thread (glenn's responce) and cant seem to get it to work. Have looked everywhere!

Any help would be creately appreciated.

Currently the code for that specific text box looks like this:

Private Sub Dates2_Change()
Format "dd/MM/yyyy"
End Sub

Any help???????????????/

Mick

PS: hope i put this thread in the correct catagory...This time!!!

in your form_load event, you can put something like:

yourtextbox.Text = Format(Date, "dd/MM/yyyy")



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum