Thanks for all the help so far so good as they say...
Why does this always run the application no matter whether "Cancel" or Okay is selected?
As you can see I've been trying several solutions however, am I missing the big picture here or something? I thought "Cancel was Cancel no matter what but, in my case "Cancel" is still running my next macro
I wanted the message box to run like this under the above If statement but by golly, no go
MsgBox Range("B1").Value & " " & Range("A6").Value & Range("A7").Value, vbOKCancel
but the If statement before it makes excel a very unhappy person
Why does this always run the application no matter whether "Cancel" or Okay is selected?
As you can see I've been trying several solutions however, am I missing the big picture here or something? I thought "Cancel was Cancel no matter what but, in my case "Cancel" is still running my next macro
Code:
If Range("B1") = "ABC" Then
MsgBox "ABC", vbOKCancel & " for " & Range("A6").Value
'ActiveSheet.Delete
'Exit Sub
'Else
Application.Run "ABC"
'Exit Sub
End If
I wanted the message box to run like this under the above If statement but by golly, no go
MsgBox Range("B1").Value & " " & Range("A6").Value & Range("A7").Value, vbOKCancel
but the If statement before it makes excel a very unhappy person