addin toolbar

G

Guest

Hi,
I have a macro called Mymacro()
I need to save that macro as an add-in...

The problem is that I need to have a toolbar button that will launch
Mymacro().

I need the addid to create this toolbar button too.

Any idea?

Paul
 
G

Guest

Hi,

I had the same problem too and decided to assign shortcut keys to my macros.
This way I sepparated the issue of the macro that launches the toolbar from
the macros that do the tasks. For example, you could install the Add-Inn and
have the following code in one module

Option Explicit
Public Sub SetMacroOptions()
Dim Description As String
Description = "Installs the ""error checking"" and ""show/hide"" command bars"
Call Application.MacroOptions(Macro:="InstallCommandBar", _
Description:=Description, _
HasShortcutKey:=True, _
ShortcutKey:="I")
End Sub

After you put the Add-Inn in the right folder, you just press Ctrl+Shift+I
and the toolar is installed (the "InstallCommandBar" macro). I hope this
helps.

What do you mean when you say "I need to save that macro as an Add-In"? Do
you mean saving a workbook (that contains VB code) as an Add-In?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top