Message Box Error

  • Thread starter Thread starter JamesJ
  • Start date Start date
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
 
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)
 
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)
 
Back
Top