Hi, i have a program that make at run time a array of comm control. There's a line in program that verify the size of array to know how much comms object are instanced. In begining, the number is zero.
When i run this code in a program that will be a executable, all works fine and size of comms array is zero. But im developing a ActiveX and when i try run this code in ocx program, the value of array size is -1. Why, if in design time, the value is fized to zero?Code:Global Comms_Ctrl() As MSComm 'line of module 'code of public function Case 0 To UBound(Comms_Ctrl) 'verify the size of array 'this is a valid comms control number Case Else MsgBox "This device/protocol has not been initialized." MsgBox "The comms_control% is not valid in function open_port%" open_port% = 1 comms_control% = 0 'Exit Function End Select
Someone know what is happening?
thanks
daniel




Reply With Quote