Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 391
Default Process steps to compile current VBA macros into a DLL or COM Addin

2003, 2007


I believe I have the s/w but not the process to get my VBA into a DLL file

I now have C++ and have successfully compiled some Math-example program written in C++ into a DLL
which can be called by VBA in Excel. So far so good!

What is missing is what I want to accomplish - which is to protect my current VBA code.

What steps do I have to take to be able to drop my VBA (Excel) code into a C++ via Win32 Console
Application Project and then ending up with an Com Addin of a DLL?

As I see it there must be a way to get my VBA into C++ to end up with a DLL:

Plan A Plan B
1) have VBA code (Excel) 1) VBA code
2) Possibly save that code as a .xla file? 2) Drop into VB.NET and/or C++
3) Compile into DLL? (With what? and how?) 3) Compile into a DLL
4) Call new DLL from Excel VBA 4) Call DLL new from Excel VBA

I have a LInk to Chip Pearson's site and his information is excellent. That said, where does my
current VBA code get into the mix?

Any Thoughts appreciated!
EagleOne
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Process steps to compile current VBA macros into a DLL or COM Addi

What version of C++ do you have. If you have microsoft c++ you can convert
the macro code to C++. Microsoft Visual Studio has the library function to
work with a excel spreadsheet. The same excel libraries are uspport in both
C++ and VB.Net it just the language syntax that is different.

Excel VBA does not have the option to compile and produce a dll. You can
run macros from inside an excel workbook from a command line option using an
workbook open event . You can start an excel file from the following command
line

excel.exe c:\temp\book1.xls

The workbook open macro in book1.xls will automatically run. The macro can
automatically take input from a text file and produce output in a text file
that can be read in C++.

" wrote:

2003, 2007


I believe I have the s/w but not the process to get my VBA into a DLL file

I now have C++ and have successfully compiled some Math-example program written in C++ into a DLL
which can be called by VBA in Excel. So far so good!

What is missing is what I want to accomplish - which is to protect my current VBA code.

What steps do I have to take to be able to drop my VBA (Excel) code into a C++ via Win32 Console
Application Project and then ending up with an Com Addin of a DLL?

As I see it there must be a way to get my VBA into C++ to end up with a DLL:

Plan A Plan B
1) have VBA code (Excel) 1) VBA code
2) Possibly save that code as a .xla file? 2) Drop into VB.NET and/or C++
3) Compile into DLL? (With what? and how?) 3) Compile into a DLL
4) Call new DLL from Excel VBA 4) Call DLL new from Excel VBA

I have a LInk to Chip Pearson's site and his information is excellent. That said, where does my
current VBA code get into the mix?

Any Thoughts appreciated!
EagleOne

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How many steps of Macros is support in Office Excel?? Chip Pearson Excel Discussion (Misc queries) 0 January 4th 08 08:25 PM
How many steps of Macros is support in Office Excel?? Dave Peterson Excel Discussion (Misc queries) 0 January 4th 08 07:51 PM
Using an excel addin to call macros in current sheet. [email protected] Excel Programming 0 April 17th 07 09:08 AM
running macros, and not showing the steps bwilk77 Excel Discussion (Misc queries) 2 March 23rd 07 06:21 PM
combining macros - compile error: duplicate declaration in current scope J.W. Aldridge Excel Programming 1 December 9th 06 03:50 PM


All times are GMT +1. The time now is 11:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"