+ Reply to Thread
Results 1 to 9 of 9

How to add LAST Updated data Date on your UserForm?

  1. #1
    Forum Contributor
    Join Date
    03-28-2013
    Location
    singapore
    MS-Off Ver
    Excel 2010
    Posts
    157

    Question How to add LAST Updated data Date on your UserForm?

    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.

  2. #2
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: How to add LAST Updated data Date on your UserForm?

    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

  3. #3
    Forum Contributor
    Join Date
    03-28-2013
    Location
    singapore
    MS-Off Ver
    Excel 2010
    Posts
    157

    Re: How to add LAST Updated data Date on your UserForm?

    @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.

  4. #4
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: How to add LAST Updated data Date on your UserForm?

    See attached... Sheet2 is the hidden sheet

    UpdateExample.xls

  5. #5
    Forum Contributor
    Join Date
    03-28-2013
    Location
    singapore
    MS-Off Ver
    Excel 2010
    Posts
    157

    Re: How to add LAST Updated data Date on your UserForm?

    @ 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.

  6. #6
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: How to add LAST Updated data Date on your UserForm?

    That's very strange indeed.

    Does it display any date when you open the userform ?

  7. #7
    Forum Contributor
    Join Date
    03-28-2013
    Location
    singapore
    MS-Off Ver
    Excel 2010
    Posts
    157

    Re: How to add LAST Updated data Date on your 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.

  8. #8
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: How to add LAST Updated data Date on your UserForm?

    i know. That's why it's stored on a hidden worksheet which retains the value between userform initiations....

  9. #9
    Forum Contributor
    Join Date
    03-28-2013
    Location
    singapore
    MS-Off Ver
    Excel 2010
    Posts
    157

    Re: How to add LAST Updated data Date on your UserForm?

    @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.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1