Parker Hannifin
home | products | how to buy | support & downloads | literature | search

Click Here to go to new EM&D Knowledge Base (FAQ) site

VB generates Runtime Error 91

Error: "Runtime Error 91" is a Visual BASIC error which means "Object variable not set". This indicates that the object was never created using the "Set" command before being used.

Remedy: Be sure to use the SET statement to create the new oject.

Example: (also shows Ethernet connection)

Dim stat As BOXBRIDGELib.Status
Dim util As BOXBRIDGELib.Utility
Dim cntl As BOXBRIDGELib.Control

Set stat = New Status
stat.bOnConnectTest = False
stat.bstrIP = ""
stat.Connect 3, 0

Set util = New BOXBRIDGELib.Utility
util.bOnConnectTest = False
util.bstrIP = ""
util.Connect 3, 0

Set cntl = New BOXBRIDGELib.Control
cntl.bOnConnectTest = False
cntl.bstrIP = ""
cntl.Connect 3, 0