Thread: MsgBox Problem
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
moon[_6_] moon[_6_] is offline
external usenet poster
 
Posts: 43
Default MsgBox Problem


There is a MsgBox-statement and there is a MsgBox-function. It seems you're
confusing them.


Public Sub MsgBoxTest()

'MsgBox-Function
Dim mbresult As VbMsgBoxResult
mbresult = MsgBox("Do you want to continue?", vbYesNo + vbQuestion,
"Title")
If mbresult = vbYes Then
'Do your stuff
End If

'MsgBox-Statement
MsgBox "MsgBox-statement sample", vbInformation, "Title"

End Sub




"Rob" schreef in bericht
...
I am Soooo Freeeekin ****ed at this stupid crap...

Why won't this stop returning errors?

MsgBox("First Fill In The Name",vbOKCancel)

I get an expected = error, so I put a darn = then it pops up a darn list
so
i select a stupid vbCancel. Well when I run it I get a darn darn darn
*&^$%#&%& error again. I tried all sorts of variants but the only one that
works is this....

MsgBox("First Fill In The Name")

What in the world is going on here and why?

Thank You Very Much In Advance,
Rob