Forum Discussion
serialcomms
Aug 17, 2022Copper Contributor
Serial COM Ports in Excel VBA
Hello all, I've uploaded a new set of VBA functions for anyone still interested in using Serial COM Ports with Excel. GitHub - Serialcomms/Serial-Ports-in-VBA-new-for-2022: Using Serial COM ...
TangJop
Jun 15, 2023Copper Contributor
serialcomms Hello,
One additional question: I need to identify a device connected to a given port. How to get some device info (like its name, type or anything significant) ?
Thanks in advance for your feedback.
- LuisS90Jun 15, 2023Copper Contributor
Maybe you should try this:
'--------------------------------------------------------------------------------------------------
'Loops through all the USB controllers and devices (sticks, hubs, etc.) and retrieves information.
'The code uses a WMI script in order to access the Win32_USBControllerDevice class.
'Written By: Christos Samaras
'Date: 13/01/2014
'E-mail: email address removed for privacy reasons
'Site: https://www.myengineeringworld.net
'https://myengineeringworld.net/2014/01/retrieve-usb-device-information-vba-wmi.html
'--------------------------------------------------------------------------------------------------- TangJop320Jun 10, 2024Copper ContributorHello Luis, sorry for this VERY long delay. Again thx for your support. This is very useful and efficient. Bthw I tried the code and it works (I only needed to replace your 'shUSB' with my 'Sheets("MySheetName")'. But it take a too long time before I get my USB ports. I get a full set of info, but I need only 10% of it. How to restrict the result to the lines contaning '(COMx' only ? Probably by modifing the SQL request probably, but I need inputs about it. Thx in advance for your help.