468,483 Members | 2,697 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,483 developers. It's quick & easy.

VbScript error "VB runtime error : Object required”

We are writing test scripts to our product.
In one of the script we are facing an issue.

This test script will create a COM component and
executes the following function. O1 and O2 are out parameters.

v2iAuto.ComputerPolicyLevel(False, o1, o2)

We are facing issue while iterating through 02 object.
O2 contains array of variants(Interface objects)
say I1,Which in turn each I1 interface object contains list of
another interface objects say I2 and we tried access property of
interface I2.

The following is the code that i tried iterate through
o2 object.
If IsArray(o2) Then
for each oVar in o2(0) (temporally I'm trying for 0th element)
obj = oVar.Level
WScript.Echo .Level
next
End if

Error:
I'm getting “VB runtime error : Object required” after executing line

obj = oVar.Level


but i have also tried as

Set obj = oVar.Level

Still was getting same error
Mar 31 '10 #1
1 2213
jhardman
3,405 Expert 2GB
I'm trying to get a handle on what you are trying to do. oVar.Level is an object. of what type?

I'm not sure vbscript can do what you are trying to do.

Jared
Apr 1 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by =?Utf-8?B?TWF0dCBDYWxob29u?= | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by kmladenovski | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.