Forum Discussion

Deo_Cleto's avatar
Deo_Cleto
New Contributor
13 years ago

Microsoft VBScript runtime error, Object doesn't support this property or method

Why am I getting this error, it is just a simple select case code:



Select Case I_Business  (this is where it's exactly failing),  'I_Business' is a variable and when I evaluate this variable it has a value that is coming from the datafile but can't get pass this line.



Any idea, anyone?



Thank you.

3 Replies

  • Deo_Cleto's avatar
    Deo_Cleto
    New Contributor
    Thank you.  I tried to attached the project but your system won't allow it because of the size of the project.



    Here's the code:




    Sub Details_Panel


    Details_Panel

    '*************************************************************************************************************'


    ' Inputs data on the "Policy" panel according to data on the data file (.CSV) and according to the LOB on the,'


    ' since they share the same screen but the enabled fields can be different. '


    '*************************************************************************************************************'



    '03152013 - Modified Window Object


    'Set Pg4 = p.IEFrame(2).Window("Shell DocObject View", "", 1).Window("Internet Explorer_Server").Page("*")


    Set Pg4 = p.IEFrame(2).Tab("AQS/advantage - Policy - * - Windows Internet Explorer").Window("Shell DocObject View", "", 1).Window("Internet Explorer_Server", "", 1).Page("*")


    If I_LOB <> general_liability Then


    Call Pg4.Frame("MAIN").Table("tblTabs").Cell(0, 1).Click


    Else


    Call Pg4.Frame("MAIN").Table("tblTabs").Cell(0, 2).Click


    End If


     


     


    'Prev. Policy Number


    Select Case I_Business  ' here where it exactly fails, i evaluate this variable and it's returning the correct value.


    Case auto, special_program


    Set Prev_Policy_Number = Pg4.Frame("MAIN").Panel("divTab_2").Textbox("dtaBOPPOL_LEXPPOLNUM")


     


    Case cma


    Select Case I_LOB


    Case inland_marine


    Set Prev_Policy_Number = Pg4.Frame("MAIN").Panel("divTab_2").Textbox("dtaINMPOL_LEXPPOLNUM")


    Case crime


    Set Prev_Policy_Number = Pg4.Frame("MAIN").Panel("divTab_2").Panel(0).Textbox("dtaKRMPOL_LEXPPOLNUM")


    Case general_liability


    Set Prev_Policy_Number = Pg4.Frame("MAIN").Panel("divTab_3").Panel(0).Textbox("dtaLIAPOL_LEXPPOLNUM")


    Case property_


    Set Prev_Policy_Number = Pg4.Frame("MAIN").Panel("divTab_2").Panel(0).Textbox("dtaPRPPOL_LEXPPOLNUM")


    End Select


    End Select


     


     


    Prev_Policy_Number.value = " "


     



    End Sub


  • Hi Deo,



    Thanks of the code. What is the type of the I_Business variable's value? Is it the same as the type of the auto, special_program variables? You can find this out using "Evaluate Dialog".