Create static timestamp when radio button/ macro is actioned

  • Hi all

    I have assigned a macro to a radio (print) button that will print a specific range (report) and insert a timestamp in a dedicated cell to indicate the date/ time when that report was printed (using the =NOW() function)

    There are multiple buttons with the assigned macros and cell ranges updated respectively but, regardless of which button I press, all other timestamps update to reflect the time the most recent button was actioned.

    If someone could review the code below and make a suggestion it would be appreciated

    Sub Button2_Click()

    Sheets("Oil Record Book Sheets").Select


    Selection.PrintOut Copies:=1, Collate:=True



    ActiveCell.FormulaR1C1 = "=NOW()"


    End Sub

  • Hi,

    You could test the following

    Sub Button2_Click()
    Sheets("Oil Record Book Sheets").Range("A93:I184").PrintOut Copies:=1, Collate:=True
    With Sheets("Worksheet").Range("R36")
        .FormulaR1C1 = "=NOW()"
        .NumberFormat = "d/mm/yyyy hh:mm:ss"
        .Value = .Value
    End With
    End Sub

    Hope this will help

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Thumbs Up" icon, below, in the bottom right corner:)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!