View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
FSt1 FSt1 is offline
external usenet poster
 
Posts: 3,942
Default Assigning macro to toolbar - only works sometimes!

hi
Assigning it to a toolbar icon don't not make available to all files.
in order for a macro to run, the file in which the macro resides must be open.
the macro does not have to been in the file in which it is running unless
the file is mentioned by name.
many people have personal macros that they need frequently for any file.
they place these macros in a personal.xls file and put the personal.xls file
in the xl start folder. the personal.xls file opens(hidden) when xl opens and
all macros are available for any file. have your colleague try somthing like
that.

regards
FSt1

"Zak" wrote:

I have recorded a few macros for my colleague, i have sent the file across in
which the macro was coded and have advised my colleague to assign the macro
to a toolbar button.

He assigned the macro to a toolbar button but finds that each week he needs
to run the macro he has to copy and paste the new info in the old file (in
which the macro was created) and then run the macro because if he doesnt do
this and clicks the smiley face (where the macro is assigned) he gets a
message 'macro cannot be found' - because the macro was obviosuly not
recorded in this file.. but how can i make it so the macro works all the
times.. so he doesnt have to copy and paste over the old data all the time
just because the macro sits in that file.. it should work now all the time
because the macro has been asssigned to a toolbar button, right?

At one point he found that even when he did copy and paste the info from new
to old, the toolbar assigned macro didnt work and said 'file cannot be found'.

please advise.