Re: Error trying to compile using VBA
- From: "Amir" <agamy@xxxxxxxxxxxx>
- Date: Sat, 9 Jul 2005 20:39:39 +0200
Hi there,
Actually what I'm trying to do is not to compile a dll but to import a
module, then compile it, and save the template.
I want to do so as part of 'Installation' Macro I am preparing. The purpose
is to make an installation document which will install other modules and
forms, and create command bars.
This is because I don't want users to start importing modules and forms
themselves. I want to do that 'programatically' by asking them to open a
Word document which in it's Open event will import all the required modules,
forms and build the command bars. Therefore I assume that I need to compile
the modules I import using that installation macro...
Can you think of a better way of doing that kind of installation?
I can't understand why it has to be so compliacted.
I already have the code making the command bars.
Why users can't just disable security restrictions, then click 'setup.exe'
or open some file to have all the command bars, modules and forms working in
the Normal.dot template?
How can I afford them a simple way to install that set of modules, forms and
command bars I need?
Thanks for your help.
"Jean-Guy Marcil" <no-spam@xxxxxxxxxxxxx> wrote in message
news:Or5I6cJhFHA.3164@xxxxxxxxxxxxxxxxxxxxxxx
> Amir was telling us:
> Amir nous racontait que :
>
>> Hi!
>>
>>
>>
>> I'm trying to compile a normal.dot project using the following
>> command:
>>
>>
>> application.VBE.VBProjects.Item("Normal").MakeCompiledFile
>>
>
> 2 comments, one helpful, and the other not so much!
>
> Helpful Comment:
>
> According to help, you need to use "BuildFileName" before you call
> "MakeCompiledFile".
> So, the following code should work (You need to set a reference to the
> "Microsoft Visual Basic for Applications Extensibility 5.3" library).
>
> '_______________________________________
> Dim myProject As VBProject
>
> Set myProject = Application.VBE.ActiveVBProject
>
> myProject.BuildFileName = "C:\MyOtherProject.dll"
> myProject.MakeCompiledFile
> '_______________________________________
>
> Not so helpful comment:
>
> The above code still generates the same error you saw and I do not know
> why... Maybe it has to do with the type of project? Maybe we need a Class
> Module first?
> I Googled it up for a while and only found references to the fact that it
> does not work (except for the links that were in Russian, Japanese or
> German, which I do not read!) and obviously nobody had a solution.
>
> I have always heard that if you want to make a DLL, you have to go through
> Visual Studio... but if you find a way to make "MakeCompiledFile" work, do
> let us know!
>
> Good luck!
> --
> Salut!
> _______________________________________
> Jean-Guy Marcil - Word MVP
> jmarcilREMOVE@xxxxxxxxxxxxxxxxxxxxxxx
> Word MVP site: http://www.word.mvps.org
>
.
- Follow-Ups:
- Re: Error trying to compile using VBA
- From: Jean-Guy Marcil
- Re: Error trying to compile using VBA
- References:
- Error trying to compile using VBA
- From: Amir
- Re: Error trying to compile using VBA
- From: Jean-Guy Marcil
- Error trying to compile using VBA
- Prev by Date: Re: Defining and changing the current used measurement unit
- Next by Date: Re: Error trying to compile using VBA
- Previous by thread: Re: Error trying to compile using VBA
- Next by thread: Re: Error trying to compile using VBA
- Index(es):
Relevant Pages
|
|