Making a macro sustain from next document onwards

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

I have created a macro in an excel work book. I have assigned this macro to
a new button.
As long as I am in the same work book, this macro works for me with the
button.
But, when I close this work book, and open a new / other work books, the
button exists, but the macro does not exist.

How can I make an macro retain / sustain in any excel workbooks that I open
and get it through the button?

Any help much appreciated.

Thanks,

Raghavendra
 
Hi!

This problem occurs because the macro are stored in the workbook.
You should move the macro to the hidden workbook "Personal.xls" in the
XLSTART folder, using the VBA editor..
The personal macro workbook Personal.xls is a global macro workbook that
Excel typically loads from the XLStart folder in a hidden state.

Best regards

Stefan Hägglund
Microsoft
 
Is this a button on a toolbar?

When you clicked on that button, didn't excel try to open your workbook with the
macro?
 
Stefan, That worked. Thanks for the help.

Dave, I just wanted the macro to work in whatever the excel work book I open.
Stefan's answer seems to do what I want. Thanks for the initiative.

MNRaghu
 

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

Back
Top