![]() |
MsgBox Problem
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 |
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 |
MsgBox Problem
I'm confused. I want a msgbox that displays my msg and has an ok and a cancel
button. How would I do that? Rob "moon" wrote: 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 |
MsgBox Problem
A function always returns a value, so here the statement will do: MsgBox "Your message", vbOkCancel, "Title" "Rob" schreef in bericht ... I'm confused. I want a msgbox that displays my msg and has an ok and a cancel button. How would I do that? Rob "moon" wrote: 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 |
MsgBox Problem
It works It Works WooooHoooo!
Thank You Soooo Much. Man I Have a lot to learn. Rob :)))) "moon" wrote: A function always returns a value, so here the statement will do: MsgBox "Your message", vbOkCancel, "Title" "Rob" schreef in bericht ... I'm confused. I want a msgbox that displays my msg and has an ok and a cancel button. How would I do that? Rob "moon" wrote: 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 |
All times are GMT +1. The time now is 01:27 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com