Author Topic: VBA code to read from HID 10 compliant scale  (Read 5542 times)

breauxlg

  • Member
  • ***
  • Posts: 2
VBA code to read from HID 10 compliant scale
« on: September 20, 2016, 08:39:44 am »
I am looking for vba code with the appropriate dll or ocx to read input from a usb hid 10 compliant scale.

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: VBA code to read from HID 10 compliant scale
« Reply #1 on: September 20, 2016, 10:09:52 am »
I have example HID code with source code that might be helpful here:

http://janaxelson.com/hidpage.htm#MyExampleCode

breauxlg

  • Member
  • ***
  • Posts: 2
Re: VBA code to read from HID 10 compliant scale
« Reply #2 on: September 20, 2016, 10:43:18 am »
First of all, thank you so much for this site and for your obvious dedication to helping people.

Second, I've programmed vba modules extensively, but in the VB editor, to be able to access the functions, I have to activate a reference for the functions which is usually supplied by a dll or ocx file. I looked at your code and it makes sense to me, but I don't know where to get the appropriate dll or ocx file to put into my system32 folder so I can select it as a reference. There are some dll's that look like they would be for this(hid.dll, usbhidapi.dll) but when I try to select them, I get an error saying it can't add a reference to the specified file. I tried registering them using regsvr32 and they won't register either.

Thanks again for your help.

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: VBA code to read from HID 10 compliant scale
« Reply #3 on: September 20, 2016, 12:48:04 pm »
hid.dll is a system file in Windows/system32, a default location where applications will search. You don't need to register it.

usbhidapi.dll is possibly from a 3rd-party library, and the dll should be included in the downloaded files.





https://www.experts-exchange.com/questions/28116793/UsbHidApi-dll-with-vba.html#answer39148793