Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2011
    Posts
    6

    Smile Unanswered: Advice on developing VBA application

    Hi to all
    Am developing a tool using VBA application. In that i need to display the current time but when the user exit and login the first login time should remain the same. To display the current time i have used NOW function, I have a doubt how i can save that time and display whenever the user exit and again login?

    Thanks & Regards,
    K.Indu..

  2. #2
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,424
    Provided Answers: 8
    there are 2 sub

    Sub Auto_Open()
    'will run when the file is open
    End Sub

    and

    Sub Auto_Close()
    'will run when the file is closed
    End Sub
    hope this help

    See clear as mud


    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB based on my own environment: vb6 sp5
    ASP based on my own environment: 5.6
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    MYLE
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.

  3. #3
    Join Date
    Jun 2011
    Posts
    6
    Hi thanks for the reply

    But its not working.. time getting changed whenever i exit and again login..
    Dim dtmtest As Date
    dtmtest = TimeValue(Now)
    TextBox1.Text = dtmtest
    This is the code i have written in Private Sub UserForm_Initialize() to display the current time so when the form gets load the current time gets display but not saved so changing every time..

    Thanks & Regards,
    K.Indu...

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    is textbox1 bound to a data column?
    I'd rather be riding on the Tiger 800 or the Norton

  5. #5
    Join Date
    Jun 2011
    Posts
    6
    hi
    No its just an empty box used to display the time and date.

    Thanks & Regards,
    K.Indu...

Posting Permissions

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