I am teaching myself VBA. I have read and read tutorials and am trying to do
somthing very simple.
Public Sub firsttry()
Dim x As Integer
x = Range("A1").Value
If x = 1 Then
MsgBox "invalid number in cell A1"
End If
End Sub
I have to run the macro for the msgbox to appear. How can it pop up as soon
as the number 1 is entered in cell A1?
Bookmarks