AnsweredAssumed Answered

VBA 7.1 and VISA-COM dosen't work

Question asked by Walera on Aug 28, 2019
Latest reply on Aug 28, 2019 by Walera

Hi! 
I'm using HP 34401A bench multimeter and trying to remote control it from Excel 365. 
VBA vercion - 7.1 
VISA-COM - 5.11

These are references for VBA projekt

 

My simple code: (also excel file attached)

Sub Button1_Click()
   Dim rm As VisaComLib.ResourceManager
   Set rm = New VisaComLib.ResourceManager
   Dim idn As String
   Dim formattedIO As New FormattedIO488
   Dim address As String

   address = "34401A"
   Set formattedIO.IO = rm.Open(address)

   formattedIO.WriteString "*IDN?", True
   idn = formattedIO.ReadString
   Sheet1.Cells(1, 1) = idn
   formattedIO.IO.Close
End Sub

This is instrument address calling "34401A" becose i allready added aliase for that instrument in Keysight connection expert:

I was also tryed to connect directly to VISA address whith is GPIB2::2::INSTR. 

 

So, if i exicute this code i have got an error:

I also check it in Keysight IO monitor an that is diferent error:

 


In reality my connection fully working, i was checked it in to Keysight interactive IO:

 

It  is working fine, but in excel it is fully unworking. That error happening exactly in that string:

Set formattedIO.IO = rm.Open(address)


Please helpp me with that. I haven't any idia what to do next. 
In my oppinion problrm may be in wrong link. If you look cearfuly to exicuted string and error, you could see some differences. I was called Open procedure, but in error i had got ParseRsrc procedure. 


Thanks for attention! 

Attachments

Outcomes