Re: Load or Install Application by Code
- From: mr_unreliable <kindlyReplyToNewsgroup@xxxxxxxxxxx>
- Date: Wed, 08 Apr 2009 12:53:50 -0400
TKM wrote:
I am new to VBA and I am looking for a snippit of code that will allow me to automate (install) a Add In for Excel.
hi TKM,
I haven't done this, but the XL help file has an explanation
of how to do it. I suggest you turn on the XL Macro Recorder,
go through the steps to install the addin (manually), and
then turn off the recorder. The recorder will provide you
with VBA code that reflects what you did (to install your
addin). Converting the VBA code to vbScript is relatively
easy.
I have included "my usual discussion" on this (a.k.a.,
boilerplate) below.
cheers, jw
____________________________________________________________
You got questions? WE GOT ANSWERS!!! ..(but, no guarantee
the answers will be applicable to the questions)
--- <boilerplate: using macro recorder to script msWD/XL> ---
I don't have any scripts handy, but my standard advice for
a situation like this is to turn on your excel macro recorder,
go through the operation you want to do "manually" (say, for
the first two worksheets), then turn off the macro recorder.
Go to the editor for macros, and pick out the vba macro code.
You then convert the vba to vbs -- not too hard to do -- but
there are a couple of things to watch out for. The most
common "thing to watch out for" is named arguments to functions
or subs. You are going to have to enter the argument values
(without the names) in their proper order.
A more definitive statement of "things to watch out for"
(when converting vba to vbs) may be found in the ng archives.
Go to: http://groups.google.com/advanced_group_search
Also, there are many postings about using excel's automation
interface, and converting vba to vbs in this very newsgroup,
which can also be located using google's group search.
--- <end of macro recorder boilerplate> ---
.
- References:
- Load or Install Application by Code
- From: TKM
- Load or Install Application by Code
- Prev by Date: Re: Running setup to install program
- Next by Date: Re: BinaryStream.Write ByteArray erroring with Code 800A0BB9, Source ADODB.Stream
- Previous by thread: Load or Install Application by Code
- Next by thread: DataSet object
- Index(es):
Loading