+ Reply to Thread
Results 1 to 5 of 5

Saving current time with macro

  1. #1
    Registered User
    Join Date
    11-04-2012
    Location
    Finland
    MS-Off Ver
    Excel 2010
    Posts
    5

    Saving current time with macro

    Hey,

    I need to create macro that saves current time on new line (on same row) each time macro runs. Click button -> time is saved, click again time is saved on next line etc.

    Im familiar with Excel (not expert) and total beginner with VBA. Im using Excel 2012.

    Thanks

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,897

    Re: Saving current time with macro

    try this:

    Please Login or Register  to view this content.
    Attach this to a Command Button
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Saving current time with macro

    Hi marttikoo and welcome to the forum,

    See the attached that has what I think you want. Click on a cell and then on the button. It will add the current time to the last column cell in that row.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Registered User
    Join Date
    11-04-2012
    Location
    Finland
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Saving current time with macro

    Thank you for very fast answers.

    MarvinP: Yes its pretty close for what I need. It would be perfect if it adds time last line in specified column (A for example). Like going from up to down, not sideways. And not needing to click to select column. After that I think I can modify code to make buttons for colunms B, C etc.

    Thanks,

  5. #5
    Registered User
    Join Date
    11-04-2012
    Location
    Finland
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Saving current time with macro

    Got my code working with few trials and errors. Thank you for helping.

+ 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