I'm just trying to learn my code, and here it is:
Sub lala()
Dim ha As String
Dim objcell As Object
Dim ha2 As String
Dim ha3 As String
For Each objcell In ActiveSheet
MsgBox ("BLAH")
ha = MsgBox("Do you want the same message box?", vbYesNo)
If ha = vbYes Then
Next objcell
Else
MsgBox("Do you want another one at all?", vbYesNo) = ha3
If ha3 = vbYes Then
ha2 = InputBox("What do you want it to say?")
Else
Exit Sub
End If
End If
End Sub
You are mixing an "if" and a "for", your "next" is in the "if" statement, while it should be outside it. Here is your "corrected" code :