Message Box Error

J

JamesJ

Trying to figure out why I'm getting a syntax error on the following:

MsgBox("Please enter text!",vbOKOnly, "Filter Info")

With Filter Info being the Title.

Thanks,
James
 
D

Douglas J. Steele

That's correct.

There are two different modes for MsgBox. When you include the parentheses,
it's a function that returns a value (indicating which button the user
clicked on), so you have to assign it to something. (That was the cause of
your syntax error)
 
J

JamesJ

I was going to ask.

Thanks,
James

Douglas J. Steele said:
That's correct.

There are two different modes for MsgBox. When you include the
parentheses, it's a function that returns a value (indicating which button
the user clicked on), so you have to assign it to something. (That was the
cause of your syntax error)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top