Use / Import Win32API in Excel macro

  • Thread starter Thread starter Ben Zhu
  • Start date Start date
B

Ben Zhu

I don't have a lot experience with the VB edit associated
with Excel/Word... Just wondering if I can invoke WinAPI
functions from the Excel macro?

If that is possible, then how? I have a small project
need use both lagacy RS232 port and excel sheet
functions. Really appreciated any leads / information.

Thanks a lot

Ben Zhu
 
Hi Ben,

Yes, you can use API functions from within Excel. The code would be
identical to what you would use in standard VB. Basically, you declare the
function using a Declare statement, then you can call the function from your
VBA routines.

Are you looking for something more specific?

Regards,

Jake Marx
MS MVP - Excel
 
Ben,

Yes Win32APIs can be used in VBA. If you have experience of them you should
have no problems. If not, just post a question about the API you are
interested in, you are sure to get a reply.

As to RS232, there have been numerous posts on this topic. This link
http://tinyurl.com/mx0k will take you to hundreds of posts on the subject.
 
Back
Top