-
Hung-Chun Yu 976 Reputation points Microsoft Employee
2021-03-21T08:50:13.033+00:00 Hi Oscar
Check out the following post from GE https://www.ge.com/digital/documentation/ifix/version61/Subsystems/IPIiFIX/content/ipi_notes.htm
In particular following section
Supporting VBA 6.5 After an Upgrade
In VBA 6.5, certain event parameter data types are interpreted differently than in earlier VBA version. For instance, one of these data types is the VBA ErrObject. The VisiconX Data Control uses the ErrObject data type in two of its events.If a picture created with an earlier version of iFIX contains a VisiconX Data Control, and also contains VBA 5.5 scripts added for the VisiconX Data Control's ErrorOccurred event or ExecuteComplete event, when the picture is opened in iFIX 6.1, it will generate a compiler error indicating an invalid character '_'.
This occurs because the ErrObject in VBA 5.5 is declared as type "VBA._ErrObject", and in VBA 6.5, it is declared simply as "ErrObject".
To correct the compiler problem and make the scripts function correctly, make the following changes to the event declarations:
iFIX 2.21 and earlier with VBA 5.5:
Private Sub vxData1_ErrorOccurred(pError As VBA._ErrObject)
End SubiFIX 6.1 with VBA 6.5:
Private Sub vxData1_ErrorOccurred(pError As ErrObject)
End SubiFIX 2.21 and earlier with VBA 5.5:
Private Sub vxData1_ExecuteComplete(pStatus As VBA._ErrObject, sQuery As String)
End SubiFIX 6.1 with VBA 6.35:
Private Sub vxData1_ExecuteComplete(pStatus As ErrObject, sQuery As String)
End SubNOTE: This problem may occur with other ActiveX controls and data types that GE has not directly encountered. If you see problems, you should insert the control into a new picture, go to the VBA Editor, and examine the syntax used to declare events for the control in the new picture. Use the information provided in this section to edit the event declarations in the existing picture.
Have you tried deleting the ComboBox and re-creating it and see if the code works?