This topic describes how to use My.Computer.Ports to receive strings from the computer’s serial ports in Visual Basic. I figure we could probably access a COM object and run from there, but again I am not real up on the latest and greatest libraries to use in VBA, and it would also be nice to get a quick little primer in how to easily open, send and close the connection. I know we could do it through a batch file run from the presentation on the action, but that doesn’t make me very happy. For this demonstration we will be using the mscomm32.ocx driver in VBA to control a RS232 serial port and USB virtual serial port that is created with the USB driver installed on your system for our USB products. Visual Basic for Applications Serial Port Software Example. Also, this sales guy will have no problem making small modifications to the VBA or PowerPoint presentation, but would not do as well with recompiling a. It will be a handy tool for them to demo this device with while on a projector and talking to other sales guys and non technical people. Normally I would turn it into an application of some sort, but I actually don’t think the idea is that bad. I don’t commonly use VBA, especially for anything like this. I have a need for some of our sales reps to be able to send a simple string over the serial port from an action button in PowerPoint. What is the best way to access a serial port from VBA?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |