![]() |
MakeCompiledFile Method
Out of sheer curiosity, I wanted to test and see what
compiling a VBA Excel program as a .DLL does for one. So I added the VBIDE Extensibility library to my list of references, and then added the following code to one of my shorter Excel programs: Sub CompileDLL( ) ThisWorkbook.VBProject.BuildFileName = "C:\TEST.dll" ThisWorkbook.VBProject.MakeCompiledFile End Sub When I ran the program which called the above routine the BuildFileName instruction went okay, but the next line bombed with the error message "Method not applicable to this type project." Can someone tell me what type projects can be compiled as a ..DLL, and the advantages, if any, of doing so. -- Dennis Eisen |
MakeCompiledFile Method
Dennis,
These methods are used for creating COM Add-Ins in Office XP. You need to have the Developer Edition of Office to create these DLLs. If you have this, you can go in to the VBA Editor, then the File menu, and choose New Project. This type of project (Type = 101 = vbext_pt_StandAlone) can be compiled to a DLL. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "DennisE" wrote in message ... Out of sheer curiosity, I wanted to test and see what compiling a VBA Excel program as a .DLL does for one. So I added the VBIDE Extensibility library to my list of references, and then added the following code to one of my shorter Excel programs: Sub CompileDLL( ) ThisWorkbook.VBProject.BuildFileName = "C:\TEST.dll" ThisWorkbook.VBProject.MakeCompiledFile End Sub When I ran the program which called the above routine the BuildFileName instruction went okay, but the next line bombed with the error message "Method not applicable to this type project." Can someone tell me what type projects can be compiled as a .DLL, and the advantages, if any, of doing so. -- Dennis Eisen |
All times are GMT +1. The time now is 02:58 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com