Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How many steps of Macros is support in Office Excel?? | Excel Discussion (Misc queries) | |||
How many steps of Macros is support in Office Excel?? | Excel Discussion (Misc queries) | |||
Using an excel addin to call macros in current sheet. | Excel Programming | |||
running macros, and not showing the steps | Excel Discussion (Misc queries) | |||
combining macros - compile error: duplicate declaration in current scope | Excel Programming |