Calling the VBScript InStr function returns error

I am forced to work in classic ASP for some project. I don’t want to, it’s not my idea, but there we have it – the life of a consultant is fraught with peril.

While working on some VBScript code, I wrote some code to check permissions using the InStr function, and ran into this error:

Invalid procedure call or argument: 'InStr'

My call to InStr looked like this:

InStr(0, AllowablePermissions,UserPermissions)

According to , the first parameter, which was optional, defined the starting location. On a whim, I removed the first parameter, so my function call then looked liked this:


And it worked. Go figure.

  1. #1 by Damian on March 17, 2013 - 6:00 pm

    Had the same problem, fixed it by changing my starting location from 0 to 1.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: