• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2171
  • Last Modified:

VBScript error

Hiya guys,
All I am trying to do is :
 Sub selval()
            some code
msgbox("Some text", vbYesNo)

End Sub

This throws an error saying "Cannot use parentheses when caliing a sub". What am I doing wrong?
0
Freshandeasy
Asked:
Freshandeasy
1 Solution
 
appariCommented:
either use
call msgbox("Some text", vbYesNo)

or

msgbox "Some text", vbYesNo

0
 
Lee SavidgeCommented:
Hi,

Put a break point in on the main function call. Then step through the code to see which line is failing. The problem is the MsgBox call. Don't use parentheses. Just remove them.

Regards,

Lee
0
 
FreshandeasyAuthor Commented:
thanks........worked like a charm
0

Featured Post

2018 Annual Membership Survey

Here at Experts Exchange, we strive to give members the best experience. Help us improve the site by taking this survey today! (Bonus: Be entered to win a great tech prize for participating!)

Tackle projects and never again get stuck behind a technical roadblock.
Join Now