+ Reply to Thread
Results 1 to 4 of 4

Insert date/time when macro is run

  1. #1
    Registered User
    Join Date
    02-25-2013
    Location
    Maidstone, Kent
    MS-Off Ver
    Excel 2007
    Posts
    9

    Insert date/time when macro is run

    I have a button which performs a number of actions on some data but I would like to record the date and time everytime the macro is run. What I need to is to insert the current date and time into the first blank cell within a specific column on a sheet called 'Upload'. I have yet to find a script which performs this function for me..

  2. #2
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: Insert date/time when macro is run

    Hi Allen,

    why not just :

    Please Login or Register  to view this content.
    This would put it in the first empty cell in column A
    Last edited by JasperD; 08-06-2013 at 04:55 AM.
    Please click the * below if this helps

  3. #3
    Registered User
    Join Date
    02-25-2013
    Location
    Maidstone, Kent
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Insert date/time when macro is run

    Hi JasperD. I am getting a 1004 error when running this. 'Application defined or object-defined error'.
    Is this something to do with the range?

  4. #4
    Registered User
    Join Date
    02-25-2013
    Location
    Maidstone, Kent
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Insert date/time when macro is run

    Hi JasperD. I fixed it. Thank you for your code, its solved my problem.
    I used:

    HTML Code: 

+ 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. Complex VBA problem auto insert date and time, auto insert comment, etc.
    By rojashan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-29-2013, 09:40 PM
  2. Replies: 2
    Last Post: 04-10-2013, 11:17 AM
  3. Need help for create a macro to auto insert date time after entry
    By DentedGold in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-07-2012, 11:45 AM
  4. Insert Date only from Date and Time Cell
    By Ridgebacks in forum Excel General
    Replies: 4
    Last Post: 08-20-2010, 03:22 PM
  5. Help with Macro or VBA script - Insert current Time/Date for different records
    By darkslide01@yahoo.com in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-08-2005, 11:05 AM

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