Message box problem (1 Viewer)

Walter

New member
Local time
Today, 06:29
Joined
Jan 11, 2000
Messages
9
Sorry for the simplicity of this question but I cant get it.

Hi I have a message box that pops up on a event. the thing is i cant get it to dislpy right. i want it to display the exclamation box, with only the cancel option or if thats not possible the cacel/retry option
this is what i have for codeL:
msgbox("Prompt,vbexclamation,"Title",
now I've tried everything that I can think of but cant finish off the code correctly if you could help it would be greatly appreciated thanks,
Walter
 
First,
to use a message box in this way you need to put it in an expression.
"To specify more than the first named argument, you must use MsgBox in an expression. To omit some positional arguments, you must include the corresponding comma delimiter." (taken from help)

So your answer should look something like:
Dim response As String
response = MsgBox("Prompt", 48, "Title")
or
response = MsgBox("Prompt", vbOKOnly + vbExclamation, "Title")

This gives you an OK only button, which will do the same as your desired cancel.

Hope this helps
 
thanks for the help it solved the problem =).



[This message has been edited by Walter (edited 02-01-2000).]
 
Not a question-just a statement regarding msgbox. I have had countless instances where access hangs or crashes when it encounters a msgbox line. Just a simple 'msgbox "some text"' will do it. If anyone else has had reliability problems this might just be the cause.
 

Users who are viewing this thread

Back
Top Bottom