Forum Discussion

Andy Thomson's avatar
Andy Thomson
Copper Contributor
Oct 18, 2018
Solved

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...
  • Lorenzo Kim's avatar
    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

     

Resources