Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Looking for RS232 API functions for VBA

Status
Not open for further replies.

tgq

Full Member level 5
Joined
Jul 15, 2002
Messages
289
Helped
7
Reputation
14
Reaction score
4
Trophy points
1,298
Activity points
2,360
vba rs232

Hi
VBA doesn't support MSComm activeX :cry:
Im looking for a 'ready to use' VBA module for RS232 API functions.
Best should be class module with events on character received on COM port ...
 

rs232 api

Download VB express from Microsoft. It is a free download. It has a commport you can just drop on your form which will expose the comms api.
 

rs232 vba

Hi there

the API functions for serial port are as follow:
1- to Open the Port use:
CreateFile()
2- to Configure the port use:
SetupComm()
SetCommTimeouts()
GetCommState()
SetCommState()
3- to read from the port use:
ReadFile()
4- to write to the port use:
WriteFile()
5- and finally to close the port use:
CloseHandle()

Please refer to you compiler documentation for more information about these function, I use it with the Borland C++Builder and worked well in so many projects

Good Luck
 

vba api rs232

Hello,

I am also trying to access the serial port using VBA on Excel.

I have tried using CreateFile(strPort, GENERIC_READ Or _
GENERIC_WRITE, 0, ByVal 0&, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0)
to open the port where strPort is "COM5" (USB serial device) but I always seem to get a -1.

Any help will be great.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top