PC Review


Reply
Thread Tools Rate Thread

Distributing an AddIn

 
 
Nils Titley
Guest
Posts: n/a
 
      3rd Apr 2008
Once you have a macro and have decided to make an AddIn, how do you
distribute that AddIn to other uses. For example I am in the USA, the users
will be South Africa?

Thanks
 
Reply With Quote
 
 
 
 
cht13er
Guest
Posts: n/a
 
      3rd Apr 2008
On Apr 3, 5:03 pm, Nils Titley <NilsTit...@discussions.microsoft.com>
wrote:
> Once you have a macro and have decided to make an AddIn, how do you
> distribute that AddIn to other uses. For example I am in the USA, the users
> will be South Africa?
>
> Thanks


You ensure that the .xla file creates all the menus and buttons, etc.
in the open() sub that you need ...
Then you password-protect the code, and email it off!

All they have to do is Tools->Ad-ins->Browse to select the file that
you send to them.

HTH

Chris
 
Reply With Quote
 
Nils Titley
Guest
Posts: n/a
 
      3rd Apr 2008
Thanks for responding.

I am not creating any menus or buttons. Can I create a menu button that
will run the add-in? Or how about a ctrl-chr?

The macro processes files, creates a report and moves the data files to
archive them.

Thanks

"cht13er" wrote:

> On Apr 3, 5:03 pm, Nils Titley <NilsTit...@discussions.microsoft.com>
> wrote:
> > Once you have a macro and have decided to make an AddIn, how do you
> > distribute that AddIn to other uses. For example I am in the USA, the users
> > will be South Africa?
> >
> > Thanks

>
> You ensure that the .xla file creates all the menus and buttons, etc.
> in the open() sub that you need ...
> Then you password-protect the code, and email it off!
>
> All they have to do is Tools->Ad-ins->Browse to select the file that
> you send to them.
>
> HTH
>
> Chris
>

 
Reply With Quote
 
cht13er
Guest
Posts: n/a
 
      4th Apr 2008
On Apr 3, 6:05 pm, Nils Titley <NilsTit...@discussions.microsoft.com>
wrote:
> Thanks for responding.
>
> I am not creating any menus or buttons. Can I create a menu button that
> will run the add-in? Or how about a ctrl-chr?
>
> The macro processes files, creates a report and moves the data files to
> archive them.
>
> Thanks
>
> "cht13er" wrote:
> > On Apr 3, 5:03 pm, Nils Titley <NilsTit...@discussions.microsoft.com>
> > wrote:
> > > Once you have a macro and have decided to make an AddIn, how do you
> > > distribute that AddIn to other uses. For example I am in the USA, the users
> > > will be South Africa?

>
> > > Thanks

>
> > You ensure that the .xla file creates all the menus and buttons, etc.
> > in the open() sub that you need ...
> > Then you password-protect the code, and email it off!

>
> > All they have to do is Tools->Ad-ins->Browse to select the file that
> > you send to them.

>
> > HTH

>
> > Chris


see if this doesn't help ... this is stored in the ThisWorkbook of
the .xla addin.

Private Sub Workbook_Open()

'Called when this workbook is opened
'Delete it if it already exists
On Error Resume Next
Application.CommandBars("NameMe").Delete
On Error GoTo 0

'Create the toolbar
Set Combar = Application.CommandBars.Add(Name:="NameMe",
Position:=msoBarTop)
Combar.Visible = True

'Create button
Application.CommandBars("NameMe").Visible = True
Set myControl =
Application.CommandBars("ButtonMe").Controls.Add(Type:=msoControlButton,
ID _
:=2950, Before:=1)

With myControl
.OnAction = "CodeModule.CodeName"
.FaceId = 111
.Tag = "HI"
.Caption = "HI"
.Style = msoButtonIconAndCaption
End With
..

..

..

..

End Sub


HTH

Chris
 
Reply With Quote
 
Nils Titley
Guest
Posts: n/a
 
      4th Apr 2008
I am getting a run time error 5, Invalid procedure at

Application.CommandBars("ButtonMe").Controls.Add(Type:=msoControlButton, _
ID :=2950, Before:=1)

I tried finding the problem but I am not use to using this code. Any
suggestions as to what is wrong.

Thanks


"cht13er" wrote:

> On Apr 3, 6:05 pm, Nils Titley <NilsTit...@discussions.microsoft.com>
> wrote:
> > Thanks for responding.
> >
> > I am not creating any menus or buttons. Can I create a menu button that
> > will run the add-in? Or how about a ctrl-chr?
> >
> > The macro processes files, creates a report and moves the data files to
> > archive them.
> >
> > Thanks
> >
> > "cht13er" wrote:
> > > On Apr 3, 5:03 pm, Nils Titley <NilsTit...@discussions.microsoft.com>
> > > wrote:
> > > > Once you have a macro and have decided to make an AddIn, how do you
> > > > distribute that AddIn to other uses. For example I am in the USA, the users
> > > > will be South Africa?

> >
> > > > Thanks

> >
> > > You ensure that the .xla file creates all the menus and buttons, etc.
> > > in the open() sub that you need ...
> > > Then you password-protect the code, and email it off!

> >
> > > All they have to do is Tools->Ad-ins->Browse to select the file that
> > > you send to them.

> >
> > > HTH

> >
> > > Chris

>
> see if this doesn't help ... this is stored in the ThisWorkbook of
> the .xla addin.
>
> Private Sub Workbook_Open()
>
> 'Called when this workbook is opened
> 'Delete it if it already exists
> On Error Resume Next
> Application.CommandBars("NameMe").Delete
> On Error GoTo 0
>
> 'Create the toolbar
> Set Combar = Application.CommandBars.Add(Name:="NameMe",
> Position:=msoBarTop)
> Combar.Visible = True
>
> 'Create button
> Application.CommandBars("NameMe").Visible = True
> Set myControl =
> Application.CommandBars("ButtonMe").Controls.Add(Type:=msoControlButton,
> ID _
> :=2950, Before:=1)
>
> With myControl
> .OnAction = "CodeModule.CodeName"
> .FaceId = 111
> .Tag = "HI"
> .Caption = "HI"
> .Style = msoButtonIconAndCaption
> End With
> ..
>
> ..
>
> ..
>
> ..
>
> End Sub
>
>
> HTH
>
> Chris
>

 
Reply With Quote
 
cht13er
Guest
Posts: n/a
 
      4th Apr 2008
On Apr 4, 6:50 am, Nils Titley <NilsTit...@discussions.microsoft.com>
wrote:
> I am getting a run time error 5, Invalid procedure at
>
> Application.CommandBars("ButtonMe").Controls.Add(Type:=msoControlButton, _
> ID :=2950, Before:=1)
>
> I tried finding the problem but I am not use to using this code. Any
> suggestions as to what is wrong.
>
> Thanks
>
> "cht13er" wrote:
> > On Apr 3, 6:05 pm, Nils Titley <NilsTit...@discussions.microsoft.com>
> > wrote:
> > > Thanks for responding.

>
> > > I am not creating any menus or buttons. Can I create a menu button that
> > > will run the add-in? Or how about a ctrl-chr?

>
> > > The macro processes files, creates a report and moves the data files to
> > > archive them.

>
> > > Thanks

>
> > > "cht13er" wrote:
> > > > On Apr 3, 5:03 pm, Nils Titley <NilsTit...@discussions.microsoft.com>
> > > > wrote:
> > > > > Once you have a macro and have decided to make an AddIn, how do you
> > > > > distribute that AddIn to other uses. For example I am in the USA, the users
> > > > > will be South Africa?

>
> > > > > Thanks

>
> > > > You ensure that the .xla file creates all the menus and buttons, etc.
> > > > in the open() sub that you need ...
> > > > Then you password-protect the code, and email it off!

>
> > > > All they have to do is Tools->Ad-ins->Browse to select the file that
> > > > you send to them.

>
> > > > HTH

>
> > > > Chris

>
> > see if this doesn't help ... this is stored in the ThisWorkbook of
> > the .xla addin.

>
> > Private Sub Workbook_Open()

>
> > 'Called when this workbook is opened
> > 'Delete it if it already exists
> > On Error Resume Next
> > Application.CommandBars("NameMe").Delete
> > On Error GoTo 0

>
> > 'Create the toolbar
> > Set Combar = Application.CommandBars.Add(Name:="NameMe",
> > Position:=msoBarTop)
> > Combar.Visible = True

>
> > 'Create button
> > Application.CommandBars("NameMe").Visible = True
> > Set myControl =
> > Application.CommandBars("ButtonMe").Controls.Add(Type:=msoControlButton,
> > ID _
> > :=2950, Before:=1)

>
> > With myControl
> > .OnAction = "CodeModule.CodeName"
> > .FaceId = 111
> > .Tag = "HI"
> > .Caption = "HI"
> > .Style = msoButtonIconAndCaption
> > End With
> > ..

>
> > ..

>
> > ..

>
> > ..

>
> > End Sub

>
> > HTH

>
> > Chris


Oops!
I renamed everything to TRY to make it easier ... hehe .. as you see,
the CommandBar is named "NameMe" - so fix that type ... the button
gets named in the next bit of code.

Cheers (and sorry about that!)

Chris
 
Reply With Quote
 
Nils Titley
Guest
Posts: n/a
 
      4th Apr 2008
Chris,

You have actually created more problems... but good. Now that it is working.

1) Where do I get a list that tells me the relationship between the faceID
and what bitmap I will see so I can pick my own image?
2) How do I attach my add-in to the button?
3) I have my macro that processes. I can place this call for the button at
the very top of the macro and then it will exit my add-in after the process
macro has completed?

Thanks for your help.




"cht13er" wrote:

> On Apr 4, 6:50 am, Nils Titley <NilsTit...@discussions.microsoft.com>
> wrote:
> > I am getting a run time error 5, Invalid procedure at
> >
> > Application.CommandBars("ButtonMe").Controls.Add(Type:=msoControlButton, _
> > ID :=2950, Before:=1)
> >
> > I tried finding the problem but I am not use to using this code. Any
> > suggestions as to what is wrong.
> >
> > Thanks
> >
> > "cht13er" wrote:
> > > On Apr 3, 6:05 pm, Nils Titley <NilsTit...@discussions.microsoft.com>
> > > wrote:
> > > > Thanks for responding.

> >
> > > > I am not creating any menus or buttons. Can I create a menu button that
> > > > will run the add-in? Or how about a ctrl-chr?

> >
> > > > The macro processes files, creates a report and moves the data files to
> > > > archive them.

> >
> > > > Thanks

> >
> > > > "cht13er" wrote:
> > > > > On Apr 3, 5:03 pm, Nils Titley <NilsTit...@discussions.microsoft.com>
> > > > > wrote:
> > > > > > Once you have a macro and have decided to make an AddIn, how do you
> > > > > > distribute that AddIn to other uses. For example I am in the USA, the users
> > > > > > will be South Africa?

> >
> > > > > > Thanks

> >
> > > > > You ensure that the .xla file creates all the menus and buttons, etc.
> > > > > in the open() sub that you need ...
> > > > > Then you password-protect the code, and email it off!

> >
> > > > > All they have to do is Tools->Ad-ins->Browse to select the file that
> > > > > you send to them.

> >
> > > > > HTH

> >
> > > > > Chris

> >
> > > see if this doesn't help ... this is stored in the ThisWorkbook of
> > > the .xla addin.

> >
> > > Private Sub Workbook_Open()

> >
> > > 'Called when this workbook is opened
> > > 'Delete it if it already exists
> > > On Error Resume Next
> > > Application.CommandBars("NameMe").Delete
> > > On Error GoTo 0

> >
> > > 'Create the toolbar
> > > Set Combar = Application.CommandBars.Add(Name:="NameMe",
> > > Position:=msoBarTop)
> > > Combar.Visible = True

> >
> > > 'Create button
> > > Application.CommandBars("NameMe").Visible = True
> > > Set myControl =
> > > Application.CommandBars("ButtonMe").Controls.Add(Type:=msoControlButton,
> > > ID _
> > > :=2950, Before:=1)

> >
> > > With myControl
> > > .OnAction = "CodeModule.CodeName"
> > > .FaceId = 111
> > > .Tag = "HI"
> > > .Caption = "HI"
> > > .Style = msoButtonIconAndCaption
> > > End With
> > > ..

> >
> > > ..

> >
> > > ..

> >
> > > ..

> >
> > > End Sub

> >
> > > HTH

> >
> > > Chris

>
> Oops!
> I renamed everything to TRY to make it easier ... hehe .. as you see,
> the CommandBar is named "NameMe" - so fix that type ... the button
> gets named in the next bit of code.
>
> Cheers (and sorry about that!)
>
> Chris
>

 
Reply With Quote
 
cht13er
Guest
Posts: n/a
 
      4th Apr 2008
On Apr 4, 8:54*am, Nils Titley <NilsTit...@discussions.microsoft.com>
wrote:
> Chris,
>
> You have actually created more problems... but good. *Now that it is working.
>
> 1) Where do I get a list that tells me the relationship between the faceID
> and what bitmap I will see so I can pick my own image?
> 2) How do I attach my add-in to the button?
> 3) I have my macro that processes. *I can place this call for the buttonat
> the very top of the macro and then it will exit my add-in after the process
> macro has completed?
>
> Thanks for your help.
>
>
>
> "cht13er" wrote:
> > On Apr 4, 6:50 am, Nils Titley <NilsTit...@discussions.microsoft.com>
> > wrote:
> > > I am getting a run time error 5, Invalid procedure at

>
> > > Application.CommandBars("ButtonMe").Controls.Add(Type:=msoControlButton, _
> > > * * * * * * * ID :=2950, Before:=1)

>
> > > I tried finding the problem but I am not use to using this code. *Any
> > > suggestions as to what is wrong.

>
> > > Thanks

>
> > > "cht13er" wrote:
> > > > On Apr 3, 6:05 pm, Nils Titley <NilsTit...@discussions.microsoft.com>
> > > > wrote:
> > > > > Thanks for responding.

>
> > > > > I am not creating any menus or buttons. *Can I create a menu button that
> > > > > will run the add-in? *Or how about a ctrl-chr?

>
> > > > > The macro processes files, creates a report and moves the data files to
> > > > > archive them.

>
> > > > > Thanks

>
> > > > > "cht13er" wrote:
> > > > > > On Apr 3, 5:03 pm, Nils Titley <NilsTit...@discussions.microsoft..com>
> > > > > > wrote:
> > > > > > > Once you have a macro and have decided to make an AddIn, how do you
> > > > > > > distribute that AddIn to other uses. *For example I am in the USA, the users
> > > > > > > will be South Africa?

>
> > > > > > > Thanks

>
> > > > > > You ensure that the .xla file creates all the menus and buttons,etc.
> > > > > > in the open() sub that you need ...
> > > > > > Then you password-protect the code, and email it off!

>
> > > > > > All they have to do is Tools->Ad-ins->Browse to select the file that
> > > > > > you send to them.

>
> > > > > > HTH

>
> > > > > > Chris

>
> > > > see if this doesn't help ... this is stored in the ThisWorkbook of
> > > > the .xla addin.

>
> > > > Private Sub Workbook_Open()

>
> > > > 'Called when this workbook is opened
> > > > 'Delete it if it already exists
> > > > * * On Error Resume Next
> > > > * * Application.CommandBars("NameMe").Delete
> > > > * * On Error GoTo 0

>
> > > > 'Create the toolbar
> > > > * * Set Combar = Application.CommandBars.Add(Name:="NameMe",
> > > > Position:=msoBarTop)
> > > > * * Combar.Visible = True

>
> > > > 'Create button
> > > > * * Application.CommandBars("NameMe").Visible = True
> > > > * * Set myControl =
> > > > Application.CommandBars("ButtonMe").Controls.Add(Type:=msoControlButton,
> > > > ID _
> > > > * * * * :=2950, Before:=1)

>
> > > > With myControl
> > > > * * .OnAction = "CodeModule.CodeName"
> > > > * * .FaceId = 111
> > > > * * .Tag = "HI"
> > > > * * .Caption = "HI"
> > > > * * .Style = msoButtonIconAndCaption
> > > > End With
> > > > ..

>
> > > > ..

>
> > > > ..

>
> > > > ..

>
> > > > End Sub

>
> > > > HTH

>
> > > > Chris

>
> > Oops!
> > I renamed everything to TRY to make it easier ... hehe .. as you see,
> > the CommandBar is named "NameMe" - so fix that type ... the button
> > gets named in the next bit of code.

>
> > Cheers (and sorry about that!)

>
> > Chris- Hide quoted text -

>
> - Show quoted text -


Aha! Now it gets fun
1) There are loads of add-ins for FaceIds - I use the "JWalk FaceID
Identifier" - google it
2) The code to create the commandbar and button(s) is in Private Sub
Workbook_Open() in ThisWorkbook.

the part "With myControl
.OnAction = "CodeModule.CodeName""

tells that particular button to go to a codemodule named "codemodule"
and run the sub called "codename".

3) So then you should place the code "that processes" in a module, in
"codename" so that when a user wants to run the code, (s)he hits the
button, and voila!

HTH

Chris
 
Reply With Quote
 
Doug Glancy
Guest
Posts: n/a
 
      4th Apr 2008
Nils,

For #1, here's a link to my FaceID Viewer:

http://www.dailydoseofexcel.com/arch...-viewer-addin/

hth,

Doug

"Nils Titley" <(E-Mail Removed)> wrote in message
news:9E3DAD01-C89C-4366-8DFE-(E-Mail Removed)...
> Chris,
>
> You have actually created more problems... but good. Now that it is
> working.
>
> 1) Where do I get a list that tells me the relationship between the faceID
> and what bitmap I will see so I can pick my own image?
> 2) How do I attach my add-in to the button?
> 3) I have my macro that processes. I can place this call for the button
> at
> the very top of the macro and then it will exit my add-in after the
> process
> macro has completed?
>
> Thanks for your help.
>
>
>
>
> "cht13er" wrote:
>
>> On Apr 4, 6:50 am, Nils Titley <NilsTit...@discussions.microsoft.com>
>> wrote:
>> > I am getting a run time error 5, Invalid procedure at
>> >
>> > Application.CommandBars("ButtonMe").Controls.Add(Type:=msoControlButton,
>> > _
>> > ID :=2950, Before:=1)
>> >
>> > I tried finding the problem but I am not use to using this code. Any
>> > suggestions as to what is wrong.
>> >
>> > Thanks
>> >
>> > "cht13er" wrote:
>> > > On Apr 3, 6:05 pm, Nils Titley <NilsTit...@discussions.microsoft.com>
>> > > wrote:
>> > > > Thanks for responding.
>> >
>> > > > I am not creating any menus or buttons. Can I create a menu button
>> > > > that
>> > > > will run the add-in? Or how about a ctrl-chr?
>> >
>> > > > The macro processes files, creates a report and moves the data
>> > > > files to
>> > > > archive them.
>> >
>> > > > Thanks
>> >
>> > > > "cht13er" wrote:
>> > > > > On Apr 3, 5:03 pm, Nils Titley
>> > > > > <NilsTit...@discussions.microsoft.com>
>> > > > > wrote:
>> > > > > > Once you have a macro and have decided to make an AddIn, how do
>> > > > > > you
>> > > > > > distribute that AddIn to other uses. For example I am in the
>> > > > > > USA, the users
>> > > > > > will be South Africa?
>> >
>> > > > > > Thanks
>> >
>> > > > > You ensure that the .xla file creates all the menus and buttons,
>> > > > > etc.
>> > > > > in the open() sub that you need ...
>> > > > > Then you password-protect the code, and email it off!
>> >
>> > > > > All they have to do is Tools->Ad-ins->Browse to select the file
>> > > > > that
>> > > > > you send to them.
>> >
>> > > > > HTH
>> >
>> > > > > Chris
>> >
>> > > see if this doesn't help ... this is stored in the ThisWorkbook of
>> > > the .xla addin.
>> >
>> > > Private Sub Workbook_Open()
>> >
>> > > 'Called when this workbook is opened
>> > > 'Delete it if it already exists
>> > > On Error Resume Next
>> > > Application.CommandBars("NameMe").Delete
>> > > On Error GoTo 0
>> >
>> > > 'Create the toolbar
>> > > Set Combar = Application.CommandBars.Add(Name:="NameMe",
>> > > Position:=msoBarTop)
>> > > Combar.Visible = True
>> >
>> > > 'Create button
>> > > Application.CommandBars("NameMe").Visible = True
>> > > Set myControl =
>> > > Application.CommandBars("ButtonMe").Controls.Add(Type:=msoControlButton,
>> > > ID _
>> > > :=2950, Before:=1)
>> >
>> > > With myControl
>> > > .OnAction = "CodeModule.CodeName"
>> > > .FaceId = 111
>> > > .Tag = "HI"
>> > > .Caption = "HI"
>> > > .Style = msoButtonIconAndCaption
>> > > End With
>> > > ..
>> >
>> > > ..
>> >
>> > > ..
>> >
>> > > ..
>> >
>> > > End Sub
>> >
>> > > HTH
>> >
>> > > Chris

>>
>> Oops!
>> I renamed everything to TRY to make it easier ... hehe .. as you see,
>> the CommandBar is named "NameMe" - so fix that type ... the button
>> gets named in the next bit of code.
>>
>> Cheers (and sorry about that!)
>>
>> Chris
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Distributing an AddIn and Help File Marylena Garcia Microsoft Excel Programming 3 9th Sep 2004 04:07 PM
Distributing macros by installing an Addin help_wanted Microsoft Excel Programming 2 30th Mar 2004 10:34 AM
howtofix excel 2000 says invalid AddIn for valid excel97 AddIn robm Microsoft Excel Discussion 0 24th Sep 2003 06:06 PM
VB Excel AddIn distributing Adem Bulut Microsoft Excel Programming 3 13th Aug 2003 03:34 PM
VB Excel AddIn distributing Adem Bulut Microsoft Excel Setup 3 13th Aug 2003 03:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:34 AM.