ia am trying to run a macro from a command botton only if there is any data in cell a1
here is my code that does not work
Private Sub CommandButton1_Click()
Dim ianswer As Integer
If ("a1") Is Not Empty Then
Run ("UploadToDatabaseWT062v8_800")
ianswer = MsgBox("Upload OK", vbOKOnly)
Else
ianswer = MsgBox("There is no data to upload!", vbOKOnly)
End If
End Sub
any hints?
Thanks,
W.
here is my code that does not work
Private Sub CommandButton1_Click()
Dim ianswer As Integer
If ("a1") Is Not Empty Then
Run ("UploadToDatabaseWT062v8_800")
ianswer = MsgBox("Upload OK", vbOKOnly)
Else
ianswer = MsgBox("There is no data to upload!", vbOKOnly)
End If
End Sub
any hints?
Thanks,
W.