VBscript error “VB runtime error : Object required”

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ShyamKrishnegowda
    New Member
    • Mar 2010
    • 3

    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.Compute rPolicyLevel(Fa lse, o1, o2)

    We are facing issue while iterating through 02 object.
    O2 contains array of variants(Interf ace 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
  • CroCrew
    Recognized Expert Contributor
    • Jan 2008
    • 564

    #2
    What error(s)?

    CroCrew~

    Comment

    • CroCrew
      Recognized Expert Contributor
      • Jan 2008
      • 564

      #3
      Opps,

      Your getting:

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

      Looking into it....

      CroCrew~

      Comment

      • Frinavale
        Recognized Expert Expert
        • Oct 2006
        • 9749

        #4
        I moved this question to the ASP forum because it's not a VB.NET question.
        This way if CroCrew isn't able to help you, you'll have more of a chance at getting help on the topic.

        -Frinny

        Comment

        Working...