Automatically deleting macros

D

David

I recorded and ran a macro for the the first time and it worked beautifully
but I was suprised that I was not able to fing the macro to run it in a
different workbook. I saved the macro in my Personal Macro Workbook. Do
macros automatically delete or move themselves after they are run? Do I have
to save changes to the workbook the macro was run in for the macro to be
saved? Thanks in advance.
 
P

Peo Sjoblom

If you put the macro in your personal.xls and when you close excel you will
be prompted to save personal.xls
and then you should click yes. If you don't do that the macro will be gone
next time excel opens.
If you haven't closed excel yet the macro should be available but it will
need to be applied from the personal.xls
Press Alt + F8 and you will see the macros you have. Of course if the macro
was specified to run on a particular sheet
in a particular workbook you will get an error if you try to run it for
another workbook or in another sheet

--


Regards,


Peo Sjoblom
 
D

David

Thanks Peo,
Is there a way to save a macro so that it is available in any workbook
and doesn't require being save again after it is run.
--
Thanks,
David


Peo Sjoblom said:
If you put the macro in your personal.xls and when you close excel you will
be prompted to save personal.xls
and then you should click yes. If you don't do that the macro will be gone
next time excel opens.
If you haven't closed excel yet the macro should be available but it will
need to be applied from the personal.xls
Press Alt + F8 and you will see the macros you have. Of course if the macro
was specified to run on a particular sheet
in a particular workbook you will get an error if you try to run it for
another workbook or in another sheet

--


Regards,


Peo Sjoblom
 
P

Peo Sjoblom

If you unhide personal.xls under window>unhide and save it there it will
always be available for your other workbooks and this is a one time
operation. After you have saved it do windows>hide to hide the personal.xls

If you don't save it using unhide/hide you will be prompted when you exit
excel so another way after you have put a macro in personal.xls would be to
record the macro and close excel and select yes when prompted. The reopen
excel, after that you won't be prompted unless you make changes or add
another macro.

--


Regards,


Peo Sjoblom

David said:
Thanks Peo,
Is there a way to save a macro so that it is available in any
workbook
and doesn't require being save again after it is run.
 

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