E
Ed
I recorded a macro that inputs the current time. The user will click in the
"Start Time" cell and run the macro, then when the user is finished he will
click in the "End Time" and run the macro again. What I want to do is make
sure the user does not run the macro in a cell that is not blank. I'm afraid
that the user will attempt to run the macro in a cell that already has a
value. I was thinking that an If statement, to determine if the is cell is
not blank would work.
T.I.A.
Ed
Sub Now_1()
'
' Now_1 Macro
' '
'
ActiveCell.FormulaR1C1 = "=NOW()"
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
End Sub
"Start Time" cell and run the macro, then when the user is finished he will
click in the "End Time" and run the macro again. What I want to do is make
sure the user does not run the macro in a cell that is not blank. I'm afraid
that the user will attempt to run the macro in a cell that already has a
value. I was thinking that an If statement, to determine if the is cell is
not blank would work.
T.I.A.
Ed
Sub Now_1()
'
' Now_1 Macro
' '
'
ActiveCell.FormulaR1C1 = "=NOW()"
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
End Sub