Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Sep 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile Visual Basic Help: Need date to automatically appear in text box...

    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!!!

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Zwolle, The Netherlands
    Posts
    1,120
    Thanks
    2
    Thanked 31 Times in 31 Posts
    Quote Originally Posted by mayer1508 View Post
    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")
    I am the luckiest man in the world


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •