+ Reply to Thread
Results 1 to 7 of 7

Looking for a macro to enter a date and user

  1. #1
    Forum Contributor
    Join Date
    02-02-2013
    Location
    Jacksonville, Florida
    MS-Off Ver
    Excel 2010
    Posts
    169

    Looking for a macro to enter a date and user

    I have a tab that I have named "ScheduleOfValues" (sheet 5). What I would like to have it do, is when I click on the tab to open it I would like to have a message box open so I can enter the date and users name in it and have the date be placed in "B3" and have the name of the user entered in "B6".

    I really apprciate all the help I get from this forum.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Looking for a macro to enter a date and user

    Right-click the tab and select VIEW CODE, then put this event code into the sheet module:
    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor
    Join Date
    02-02-2013
    Location
    Jacksonville, Florida
    MS-Off Ver
    Excel 2010
    Posts
    169

    Re: Looking for a macro to enter a date and user

    Thank you very much. It works great. The one thing that I didn't think about is, If I want to click on cancel the box will stay closed.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Looking for a macro to enter a date and user

    So it's ok to use this sheet without updating those values? Or only updating one? That's what would happen if we enabled the CANCEL option.

  5. #5
    Forum Contributor
    Join Date
    02-02-2013
    Location
    Jacksonville, Florida
    MS-Off Ver
    Excel 2010
    Posts
    169

    Re: Looking for a macro to enter a date and user

    Yes it would be Ok to use this sheet without updating those values. I have to review other tabs sometimes when using this one. Thanks for your help on this.

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Looking for a macro to enter a date and user

    OK, this will now accept any date after 1/1/1920 and any string for user. If you fail to enter either value it will simply abort and not update the current values.
    Please Login or Register  to view this content.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  7. #7
    Forum Contributor
    Join Date
    02-02-2013
    Location
    Jacksonville, Florida
    MS-Off Ver
    Excel 2010
    Posts
    169

    Re: Looking for a macro to enter a date and user

    Thank you works great.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Prompt user to enter date, then validate date, then continue with macro
    By rgiglio7489 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-18-2014, 04:54 PM
  2. [SOLVED] Prefill text box in userform with today's date but allow user to enter unique date
    By moosetales in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-02-2014, 09:17 AM
  3. Replies: 3
    Last Post: 02-14-2014, 12:23 PM
  4. Help Needed to Write Macro to Enter user id, pwd in web page
    By Harshini in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-27-2011, 03:15 AM
  5. [SOLVED] Macro to have user enter new worksheet name
    By MMH in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-13-2005, 09:05 PM
  6. Replies: 2
    Last Post: 03-23-2005, 08:06 PM

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