View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Bec
 
Posts: n/a
Default Macros and Toolbars

I have added the macros to the toolbar by first adding custom buttons and
then by "assigning" a macro to them. The macros have no "on action" command.
Have I added them the wrong way??

On another note:
I am used to work macros and templates and this is very very confusing. It
means if a user wants to use the template he must add it to his template
folder, add another file to his start folder and change macro setting etc
etc. Is this seriously how they expect a user to use a template? Is there no
way just to have everything in one template and have it running in the
background and have toolbar plus macros be accessible?????

Thanks again
Bec

"DaveO" wrote:

Sometimes when you try to attach a macro to a button you need to delare the
module that it is in. Say you created a module called RunMacro1 and the name
of the macro was Macro1 then you need to make sure the function's OnAction
event in the button's _click event would be....

.OnAction = "RunMacro1.Macro1"

HTH.

"Bec" wrote:

I have created a few macros and added them to a toolbar but I can't for the
life of me get them to work on another computer. I have "attached" the
toolbar so it stays with the spreadsheet. And I have added the macros into
the personal.xls file and attached them to the toolbar buttons.

I then copy the template to another persons pc into the their template drive
and add the personal.xl into their startup.

But...when I go to use the buttons an error message comes up saying the
template (with the macros) can't be found. When I go and see how the macros
are added to the toolbar they seem to have file locations from the original
pc even though I added them as directly from the personal.xls.

I have read lots of posts and am trying to figure this out but it is just
not working.

(please note that at no time will the users be clicking on the template but
they will be just using the toolbar as it opens in any excel file - this is
because I am running a report from excel which does not run from the excel
spreadsheet)

I have tried to include as much inof as possible but apologies if this is
confusing.

Thanks in advance!!!!!!