So here is the situation,
I have a macro for changing a cell's fill color when a button is clicked. I would like the macro to record the date/time it was used on each cell in a corresponding cell on a separate sheet. In other words, If the button is clicked, I want a time stamp in a cell on a different sheet. That cell must correspond with the cell modified by the macro. Below is the current VB code for the macro. Any help would be greatly appreciated.
Sub highlightgreen()
' highlights the current cell in green to denote passage through inspection device
' Keyboard Shortcut: Ctrl+g
ActiveSheet.Unprotect Password:="wouldntyouliketoknow"
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 5296274
.TintAndShade = 0
.PatternTintAndShade = 0
End With
ActiveSheet.Protect Password:="wouldntyouliketoknow"
End Sub
I thought of using a time stamp code similar to the one below (which I used in a different workbook). But I'm not sure how to implement it.
Sub timestart()
With ActiveCell
.Value = Time
ActiveCell.Offset(0, 1).Range("A1").Select
End With
End Sub
I have a macro for changing a cell's fill color when a button is clicked. I would like the macro to record the date/time it was used on each cell in a corresponding cell on a separate sheet. In other words, If the button is clicked, I want a time stamp in a cell on a different sheet. That cell must correspond with the cell modified by the macro. Below is the current VB code for the macro. Any help would be greatly appreciated.
Sub highlightgreen()
' highlights the current cell in green to denote passage through inspection device
' Keyboard Shortcut: Ctrl+g
ActiveSheet.Unprotect Password:="wouldntyouliketoknow"
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 5296274
.TintAndShade = 0
.PatternTintAndShade = 0
End With
ActiveSheet.Protect Password:="wouldntyouliketoknow"
End Sub
I thought of using a time stamp code similar to the one below (which I used in a different workbook). But I'm not sure how to implement it.
Sub timestart()
With ActiveCell
.Value = Time
ActiveCell.Offset(0, 1).Range("A1").Select
End With
End Sub