+ Reply to Thread
Results 1 to 11 of 11

UserForm show cell value with the current Date and Tme

  1. #1
    Forum Contributor
    Join Date
    08-12-2010
    Location
    Excel World
    MS-Off Ver
    Excel 2013, 2019 & O365
    Posts
    214

    Exclamation UserForm show cell value with the current Date and Tme

    Hi All,

    Can you please help me out with my userform in the attached workbook? I am getting three problems in below situations:

    1.) I have written below vba codes in the ThisWorkbook to show the userform automatically at the opening of the workbook:
    Please Login or Register  to view this content.
    Problem - the userform continuously shows, and doesn't hide itself after the wait time of 3 seconds. I have to manually close the userform. How can I show the userform only for the 3 seconds at the time of opening the workbook?

    2.) I want to insert a section in the userform where the current date and current time automatically can display. Kindly see the attached for the userfrom.

    3) How can a userform show/ reflect a defined cell's value, for example - How can I connect cell A1 of sheet1 to the userform, so the userform will show cell A1's value in it at the time of opening?

    Thanks in advance!
    Attached Files Attached Files
    Last edited by SunOffice; 03-12-2011 at 08:21 AM. Reason: Edited Name from 'UserForm show with the current date' to 'UserForm show cell value with the current Date and Tme'.
    Excelforum is Completely Awesome! True learning with Live Examples & Best Techniques!!

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: UserForm show with the current date

    For #2 and #3

    Place this code in the vba code for the form. You'll notice I placed a third label on the form for the contents of A1.

    Please Login or Register  to view this content.
    For #1 trying to figure out the correct syntax.
    HTH
    Regards, Jeff

  3. #3
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: UserForm show with the current date

    This seems to work...

    Form code
    Please Login or Register  to view this content.

    Standard Module
    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    08-12-2010
    Location
    Excel World
    MS-Off Ver
    Excel 2013, 2019 & O365
    Posts
    214

    Re: UserForm show with the current date

    This trick is AWESOME MAN!! Working perfect!!

    I just edited label sequence in your codes:

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

    Please Login or Register  to view this content.

    ....but now I've got one more question regarding the UserForm, what if I create another userform, which is UserForm2.
    Then how can I make UserForm2 as a password protection for the worksheet3? so if someone puts the right password, then only the worksheet3 will be visible.

    P.S. —› Do I need to start a new thread for it?
    Last edited by SunOffice; 03-12-2011 at 07:44 AM. Reason: Excel file attched.

  5. #5
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: UserForm show cell value with the current Date and Tme

    You might find this interesting. It doesn't have the password protection part, but that can be built in.

    http://www.xl-logic.com/modules.php?...op=MostPopular

    Userform Examples
    (about 7th link down the page)

  6. #6
    Forum Contributor
    Join Date
    08-12-2010
    Location
    Excel World
    MS-Off Ver
    Excel 2013, 2019 & O365
    Posts
    214

    Re: UserForm show cell value with the current Date and Tme

    This is very interesting, thanks a world for inspiring me more!
    I never thought that way of using the UserForms,,,, beauiful! I'm just trying to understand the codes, seem a bit higher than my programming level.

  7. #7
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: UserForm show cell value with the current Date and Tme

    See this


    PASSWORD FORM4.zip


    In future though when one question has been answered, mark it solved. Then ask the next question in a new thread
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  8. #8
    Forum Contributor
    Join Date
    08-12-2010
    Location
    Excel World
    MS-Off Ver
    Excel 2013, 2019 & O365
    Posts
    214

    Re: UserForm show cell value with the current Date and Tme

    Thanks for help!
    Can anyone help me to tell about some good video tutorials abt making UserForms and using its Control features like ComboBox, ListBox making.
    I am not so perfect in it.

  9. #9
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: UserForm show cell value with the current Date and Tme


  10. #10
    Forum Contributor
    Join Date
    08-12-2010
    Location
    Excel World
    MS-Off Ver
    Excel 2013, 2019 & O365
    Posts
    214

    Re: UserForm show cell value with the current Date and Tme

    Thanks a world!

    Now I will practice more.

  11. #11
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: UserForm show cell value with the current Date and Tme

    Happy hunting

+ 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