VBA button to send command to serial port to get data and send to Excel

  • Hi guys,


    My code for my project was developed based on Pikes code in http://www.ozgrid.com/forum/showthread.php?t=168472&page=2


    I tested my code with an equipment that it comes with a "Trasnfer Data" button on it (this sends the data from the serial port to a specified cell in excel), but, now, I'm trying to create a button in excel, which will do the same thing as the "Transfer data" send to command to the serial port to get data off the equipment and input into a specific cell (say B5).


    Here's the code i have for the button, but i kept getting error message about the #COM1file




    Hope its make sense for you. Thanks.


    Regards,


    Xin

  • Re: VBA button to send command to serial port to get data and send to Excel


    If you want to write to the port its basically https://msdn.microsoft.com/en-us/library/088fx85y.aspx
    but it all depends on what you need to write to the equipment to open the text stream of data


    maybe this example in german http://michael-schwimmer.de/vba117.htm

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!