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

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!!!!!!