I have a simple program that I am trying to use to get a instruments status using VBA. I wanted to find out if it is possible to use VISA-Com 5.13 Type Library and have it be able to run with either a USB or LAN address.
My code uses UUT_Address as the USB or LAN address. When I declare UUT_Address as a USB address everything works, but when I declare it as LAN address I get an the following error. Is the VISA-COM 5.13 Type Library capable of this?
Dim RM As VisaComLib.ResourceManager Dim VISACOMOBJ As VisaComLib.FormattedIO488 Dim list() As String Dim timeout As Long: timeout = 50000 '5000msec
Set RM = New VisaComLib.ResourceManager Set VISACOMOBJ = New VisaComLib.FormattedIO488 Set VISACOMOBJ.IO = RM.Open("UUT_Address", NO_LOCK, timeout) With VISACOMOBJ .IO.timeout = timeout