Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Programmatically Creating modules & projects
Message
From
02/02/1999 15:14:57
 
 
To
All
General information
Forum:
Visual Basic
Category:
Other
Title:
Programmatically Creating modules & projects
Miscellaneous
Thread ID:
00183137
Message ID:
00183137
Views:
65
I need to programmatically create a new project, add a module (which I may create through text output or use a pre-built one), make the project into a ActiveX dll, register it and run it. My only problem so far is that unless I am creating an add-in to run inside of the VB IDE, I can't create a new instance of the vbIDE.VBE object in order to access the extensibility object heirarchy to create a new project, add the module as a component, & make the project. How can I do this from a stand-alone EXE/ActiveX component???


Here is the sample code I tried from a standard EXE project with 1 command button:

Dim vbIDE As vbIDE.VBE
Dim vbNewPrj As VBProject

Private Sub Command1_Click()
Set vbIDE = New vbIDE.VBE
Set vbNewPrj = vbIDE.VBProjects.Add(vbext_pt_StandardExe, False)
MsgBox "done"

End Sub


I get an error on the "Set vbIDE = New vbIDE.VBE" line that says "invalid use of New keyword"

I've also tried "Set vbIDE = Application" as per the add-in documentation. No worky.

PLEASE HELP!!!!!
Reply
Map
View

Click here to load this message in the networking platform