Hi, iam newbie to Excel VBA
how to add Last updated : DATE on userform.
For example: Today you updated your excel sheets so on the user form you should see something like that
Last Update: 04 /04/2013 .....dd/mm/yyy
Hi, iam newbie to Excel VBA
how to add Last updated : DATE on userform.
For example: Today you updated your excel sheets so on the user form you should see something like that
Last Update: 04 /04/2013 .....dd/mm/yyy
Last edited by joh46k; 04-04-2013 at 04:24 AM.
1.Insert a new worksheet and make it xlveryhidden.............. This will be for vba reference use only
2.When the update code runs include a line such as Sheets("Vba Ref Sheet").Range("A1").value = Now()
3.Then you need a label on your userform
4.When the userform loads you need a line such as me.MyNewLabel.caption = Sheets("Vba Ref Sheet").Range("A1").value
Elegant Simplicity............. Not Always
@AndyLitch :Is it simple for u ? can u give me sample or template , please !![]()
Last edited by joh46k; 04-04-2013 at 04:28 AM.
See attached... Sheet2 is the hidden sheet
UpdateExample.xls
@ AndyLitch : Thank you !! Actually it's working but why After i close and reopen the Userform, last update : date is disappear.It only appears , after i pressed the update button . When i reopen,why the previously updated date is disappeared or not stored in the user-form ?
Last edited by joh46k; 04-04-2013 at 05:22 AM.
That's very strange indeed.
Does it display any date when you open the userform ?
@ AndyLitch : It does display, only after i pressed the update button it appears! when i close it and re-open the Userform previously updated date is not stored !!
*** I think my UserForm_Initialize causing the problem. I will try again on that and i will reply you back.
Last edited by joh46k; 04-04-2013 at 09:30 PM.
i know. That's why it's stored on a hidden worksheet which retains the value between userform initiations....![]()
@AndyLitch:After trying few times, Now i can get my results !! Thank you so much for the quick reply !!
Have nice day!!![]()
Last edited by joh46k; 04-04-2013 at 05:46 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks