+ Reply to Thread
Results 1 to 4 of 4

How to capture current date and time when a specific macro is run?

  1. #1
    Forum Contributor
    Join Date
    01-01-2022
    Location
    India
    MS-Off Ver
    Home 2021
    Posts
    777

    How to capture current date and time when a specific macro is run?

    Hi all,

    Hope all are well.

    In attached file, i want the current date and time to be captured once a macro is run.

    In sheet "Open", current date and time to be captured in cell C2 once the macro "RunAllOpenMacros" is run.

    In sheet "Closed", current date and time to be captured in cell C2 once the macro "RunAllClosedMacros" is run.

    Note:

    1. Same cell C2 should be replaced with new date and time when the macro is run the next time.

    2. Date and time format should be as 01-Apr-2023, 03:30 PM

    3. Pass: Abc@123

    Can someone please help?

    Thank you
    Attached Files Attached Files

  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
    44,463

    Re: How to capture current date and time when a specific macro is run?

    Try:
    Please Login or Register  to view this content.
    for a date and time stamp.
    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 Contributor
    Join Date
    01-01-2022
    Location
    India
    MS-Off Ver
    Home 2021
    Posts
    777

    Re: How to capture current date and time when a specific macro is run?

    @ TMS

    Perfect. Thanks for your response
    Last edited by rizwanulhasan; 04-01-2023 at 08:13 AM.

  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
    44,463

    Re: How to capture current date and time when a specific macro is run?

    You're welcome.



    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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. Need to Capture Current Date Time of Linked Workbook in a Report
    By Teddytim in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-20-2018, 10:10 AM
  2. Current Time Capture When Formula Result Turns to 0
    By reachharry in forum Excel General
    Replies: 6
    Last Post: 05-20-2017, 01:54 AM
  3. Replies: 5
    Last Post: 09-26-2014, 10:51 AM
  4. [SOLVED] Enter current date and time in subject of macro email
    By ExcelFailure in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-13-2013, 11:15 AM
  5. Need to capture date data in a text string containing a date and time stamp
    By Grilleman in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-07-2013, 01:14 PM
  6. [SOLVED] Show the date and time in a specific cell of last time we run a macro
    By dragon_m0nsta in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-08-2012, 04:49 AM
  7. Replies: 5
    Last Post: 06-08-2005, 11:05 AM

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