Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Apr 3, 5:03 pm, Nils Titley
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Apr 3, 6:05 pm, Nils Titley
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 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(T ype:=msoControlButton, ID _ :=2950, Befo=1) With myControl .OnAction = "CodeModule.CodeName" .FaceId = 111 .Tag = "HI" .Caption = "HI" .Style = msoButtonIconAndCaption End With .. .. .. .. End Sub HTH Chris |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am getting a run time error 5, Invalid procedure at
Application.CommandBars("ButtonMe").Controls.Add(T ype:=msoControlButton, _ ID :=2950, Befo=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 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 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(T ype:=msoControlButton, ID _ :=2950, Befo=1) With myControl .OnAction = "CodeModule.CodeName" .FaceId = 111 .Tag = "HI" .Caption = "HI" .Style = msoButtonIconAndCaption End With .. .. .. .. End Sub HTH Chris |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Apr 4, 6:50 am, Nils Titley
wrote: I am getting a run time error 5, Invalid procedure at Application.CommandBars("ButtonMe").Controls.Add(T ype:=msoControlButton, _ ID :=2950, Befo=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 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 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(T ype:=msoControlButton, ID _ :=2950, Befo=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 |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 wrote: I am getting a run time error 5, Invalid procedure at Application.CommandBars("ButtonMe").Controls.Add(T ype:=msoControlButton, _ ID :=2950, Befo=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 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 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(T ype:=msoControlButton, ID _ :=2950, Befo=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 |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Apr 4, 8:54*am, Nils Titley
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 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 wrote: I am getting a run time error 5, Invalid procedure at Application.CommandBars("ButtonMe").Controls.Add(T ype:=msoControlButton, _ * * * * * * * ID :=2950, Befo=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 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 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(T ype:=msoControlButton, ID _ * * * * :=2950, Befo=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 |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Nils,
For #1, here's a link to my FaceID Viewer: http://www.dailydoseofexcel.com/arch...-viewer-addin/ hth, Doug "Nils Titley" wrote in message ... 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 wrote: I am getting a run time error 5, Invalid procedure at Application.CommandBars("ButtonMe").Controls.Add(T ype:=msoControlButton, _ ID :=2950, Befo=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 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 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(T ype:=msoControlButton, ID _ :=2950, Befo=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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
setup project for Excel addin, won't register addin | Excel Programming | |||
Removing an Addin from the Tools Addin list. | Excel Programming | |||
Unshimmed Automation Addin and Shimmed COM Addin in same App Domai | Excel Programming | |||
Distributing an AddIn and Help File | Excel Programming | |||
VB Excel AddIn distributing | Excel Programming |