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

    Range("A93:I184").Select

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

    Sheets("Worksheet").Select

    Range("R36").Select

    ActiveCell.FormulaR1C1 = "=NOW()"

    Range("R37").Select

    End Sub

  • Hi,


    You could test the following


    Code
    1. Sub Button2_Click()
    2. Sheets("Oil Record Book Sheets").Range("A93:I184").PrintOut Copies:=1, Collate:=True
    3. With Sheets("Worksheet").Range("R36")
    4. .FormulaR1C1 = "=NOW()"
    5. .NumberFormat = "d/mm/yyyy hh:mm:ss"
    6. .Value = .Value
    7. End With
    8. Range("R37").Select
    9. End Sub

    Hope this will help

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