Forum Discussion
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