ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Use / Import Win32API in Excel macro (https://www.excelbanter.com/excel-programming/276675-use-import-win32api-excel-macro.html)

Ben Zhu

Use / Import Win32API in Excel macro
 
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

Jake Marx

Use / Import Win32API in Excel macro
 
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 Zhu" wrote in message
...
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




Bob Phillips[_5_]

Use / Import Win32API in Excel macro
 
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.

--

HTH

Bob Phillips

"Ben Zhu" wrote in message
...
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





All times are GMT +1. The time now is 12:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com