Forum Discussion
Andy Thomson
Oct 18, 2018Copper Contributor
Can anyone help with a command button problem please?
Hello. I am a complete novice on Excel but using google and you tube I can put basic macros etc in to play. I have created a button on a spreadsheet that when clicked creates a timestamp in a cell. I...
- Oct 18, 2018
try:
Private Sub CommandButton1_Click()
Range("F3").Value = Now()
If Range("H3") = "Available" Then
MsgBox "Please allocate a task to the driver before deployment"
Else
Range("F3").Value = Now()
End If
End Sub
Lorenzo Kim
Oct 18, 2018Bronze Contributor
try:
Private Sub CommandButton1_Click()
Range("F3").Value = Now()
If Range("H3") = "Available" Then
MsgBox "Please allocate a task to the driver before deployment"
Else
Range("F3").Value = Now()
End If
End Sub
- Andy ThomsonOct 18, 2018Copper Contributor
Thank you Lorenzo.
That works perfectly. Your assistance is greatly appreciated.
- Lorenzo KimOct 18, 2018Bronze Contributorglad it helped..