MsgBox

  • Thread starter Thread starter shasta
  • Start date Start date
S

shasta

i tried to a msgbox like i usually do and get a message wen i test i
saying
"Function call on left hand side must return variant or object"

Microsoft Help is no help....i dn't understand wat it means!:confused
 
There is no "=" after th emsgbox command
eg

MsgBox = "hello world!"
results in the error that you had.

The code should be

MsgBox "hello world"


Patrick Molloy
Microsoft Excel MVP
 
It isn't clear what you are trying to do, but try something like

MsgBox "Message",vbOkOnly,"Instructions"
' or
If MsgBox("Message",vbOkCancel,"Instructions") = vbOk Then
' user clicked OK
Else
' user clicked Cancel
End If

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 

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

Back
Top