ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   MakeCompiledFile (https://www.excelbanter.com/excel-programming/272809-makecompiledfile.html)

AA[_2_]

MakeCompiledFile
 
Application.VBE.ActiveVBProject.BuildFileName ="c:\aa.dll"
Application.VBE.ActiveVBProject.MakeCompiledFile

The above ought to create c:\aa.dll but gives

Runtime error '748'
Method or Property is not valid for this type of project.

Why not?

Also, if it works, does it produce a Win32 DLL or an
ActiveX DLL?

Thanks.

Keith Willshaw

MakeCompiledFile
 

"AA" wrote in message
...
Application.VBE.ActiveVBProject.BuildFileName ="c:\aa.dll"
Application.VBE.ActiveVBProject.MakeCompiledFile

The above ought to create c:\aa.dll but gives

Runtime error '748'
Method or Property is not valid for this type of project.

Why not?


Because you cant compile a dll from VBA, if you
could nobody would buy VB6 :)

Also, if it works, does it produce a Win32 DLL or an
ActiveX DLL?


Keith



Chip Pearson

MakeCompiledFile
 
You can use this only on stand alone VB Projects (VBProject.Type =
101 = vbext_pt_StandAlone) not on normal workbook projects
(VBProject.Type = 100 = vbext_pt_HostProject).


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"AA" wrote in message
...
Application.VBE.ActiveVBProject.BuildFileName ="c:\aa.dll"
Application.VBE.ActiveVBProject.MakeCompiledFile

The above ought to create c:\aa.dll but gives

Runtime error '748'
Method or Property is not valid for this type of project.

Why not?

Also, if it works, does it produce a Win32 DLL or an
ActiveX DLL?

Thanks.





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

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