+ Reply to Thread
Results 1 to 5 of 5

Time Stamp Macro Button that Disappears

  1. #1
    Registered User
    Join Date
    06-15-2023
    Location
    Texas
    MS-Off Ver
    Microsoft 365
    Posts
    1

    Time Stamp Macro Button that Disappears

    I am needing to create a quick way to time stamp when I enter a patients room then when I leave. I know how to create a macro button that when I select a cell then click the button it time stamps it but that is more steps then I have time for really. Wanting to create a button for each cell (column B is clock in, column C same row is clock out button) that fills the cell with the time stamp and the button for that specific cell is gone. I have seen things like this done before but have not done myself. I attached a mock up. Any ideas?

    Time Stamp Button Idea.xlsx

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,119

    Re: Time Stamp Macro Button that Disappears

    No buttons. Just type any character and press Enter in column C or D to get a Time Stamp.
    Attached Files Attached Files
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,641

    Re: Time Stamp Macro Button that Disappears

    Hi there,

    Take a look at the attached version of your workbook and see if it does what you need. It uses the following code in the VBA CodeModule of the worksheet "OPTION 2":

    Please Login or Register  to view this content.
    Just select any of the "Begin Time" or "End Time" cells and the current time will be entered in that cell.


    Hope this helps - please let me know how you get on.

    Regards,

    Greg M
    Attached Files Attached Files

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,119

    Re: Time Stamp Macro Button that Disappears

    I did consider Selection Change but decided to go for "positive action"

    This:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    can be just this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,641

    Re: Time Stamp Macro Button that Disappears

    Hi Trevor,

    Thanks for that. I "think" I was aware of the Time function, but I've used that approach for so many years that my fingers refuse to type anything else!

    Many thanks for all of your contributions on here.

    Best regards,

    Greg M

+ 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. Freeze Time Stamp upon clicking command button
    By bmmoto in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-04-2016, 05:52 AM
  2. Posting time stamp and username using command button
    By mcav16 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-23-2014, 04:08 PM
  3. Button to time stamp a row in excell worksheet
    By burdenpi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-13-2013, 02:05 PM
  4. [SOLVED] Button to place a time stamp, save the file, and exit
    By Taiter in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-20-2013, 12:48 PM
  5. [SOLVED] Button Disappears after running a Macro
    By Andrew.Trevayne in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-12-2012, 04:15 AM
  6. Modifying a Macro Button to time stamp when the button was clicked.
    By jonvanwyk in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-22-2010, 04:46 PM
  7. Command Button Date/Time Stamp
    By sky in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-10-2006, 08:10 PM

Tags for this Thread

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