J
jeff
Hi, Shane,
I assume by your question that you don't want to draw
a 'real' command button on the worksheet and associate
a macro with it.
To make a cell 'seem' a little like a button, you have
to use code similar to what I've put below - right
click on the sheet tab and select view code then paste
in. this puts the current date in the cell Beside
C5 when you click C5. (the 2nd "IF..." line and the
next one ("Exit Sub") should be on same line.)
have fun.
jeff
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Intersect(Target, Me.Range("C5:C5")) Is Nothing Then
Exit Sub
Application.EnableEvents = False
Target.Offset(0, 1) = Now()
Application.EnableEvents = True
End Sub
I assume by your question that you don't want to draw
a 'real' command button on the worksheet and associate
a macro with it.
To make a cell 'seem' a little like a button, you have
to use code similar to what I've put below - right
click on the sheet tab and select view code then paste
in. this puts the current date in the cell Beside
C5 when you click C5. (the 2nd "IF..." line and the
next one ("Exit Sub") should be on same line.)
have fun.
jeff
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Intersect(Target, Me.Range("C5:C5")) Is Nothing Then
Exit Sub
Application.EnableEvents = False
Target.Offset(0, 1) = Now()
Application.EnableEvents = True
End Sub
do I make that cell a clickale button?-----Original Message-----
How am I able to accosiate a cell with a micro and how