Link to home
Start Free TrialLog in
Avatar of UbiqutyDegins
UbiqutyDegins

asked on

Access 2010 VBA Msgbox = expected error

Why is VB Editor telling me "= expected" from this line of code?

 MsgBox("You must enter a Part Number",vbOKOnly)

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of mbizup
mbizup
Flag of Kazakhstan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Also, if you want to return a value from the Msgbox, use an = sign and parens:


Something = MsgBox("You must enter a Part Number",vbOKCancel)

Something = MsgBox("Try Again?",vbYesNo)

etc...
Avatar of UbiqutyDegins
UbiqutyDegins

ASKER

Doh, I knew that!  I feel bad now.  Thanks Again!