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

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 = "192.168.10.40"
stat.Connect 3, 0

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

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