If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Advice on developing VBA application

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-23-11, 02:57
Indumathi Kamaraj Indumathi Kamaraj is offline
Registered User
 
Join Date: Jun 2011
Posts: 6
Smile 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..
Reply With Quote
  #2 (permalink)  
Old 06-23-11, 19:37
myle myle is offline
(Making Your Life Easy)
 
Join Date: Feb 2004
Location: New Zealand
Posts: 1,143
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
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
Reply With Quote
  #3 (permalink)  
Old 06-24-11, 02:00
Indumathi Kamaraj Indumathi Kamaraj is offline
Registered User
 
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...
Reply With Quote
  #4 (permalink)  
Old 06-24-11, 03:50
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,250
is textbox1 bound to a data column?
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #5 (permalink)  
Old 06-24-11, 05:54
Indumathi Kamaraj Indumathi Kamaraj is offline
Registered User
 
Join Date: Jun 2011
Posts: 6
hi
No its just an empty box used to display the time and date.

Thanks & Regards,
K.Indu...
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On