ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Marcro does not work when original workbook is deleted (https://www.excelbanter.com/excel-programming/337625-marcro-does-not-work-when-original-workbook-deleted.html)

alley

Marcro does not work when original workbook is deleted
 
I have a macro that I want to work using a button that works for any workbook
that the user opens. However, everytime I create the macro and assign it a
button it works as long as the orig. workbook that I created the macro in
still exists. However if that workbook gets deleted when I open excel and try
to use the macro/button it gives an error that it cant fiind the book.

I dont want to attach the macro to an excel workbook but rather to just be a
standalone for anyone using the excel to be able to use at anytime.

I cant seem to be able to create a macro without a workbook open and when I
do this it only gives the options for Macros IN: All open workbooks or This
workbook.

Neither one of these seem to do the job.

Do I need to put the macro code in a class or somewhere else for the VB?

Have not played with this before so any help would be great..
--
alley

ruff

Marcro does not work when original workbook is deleted
 
create a personal macro workbook called personal.xls and store in your
XLStart folder (probably in c:\program files\microsoft
office\office10\xlstart).

open excel and select personal.xls and go to Window Hide.

everytime you open excel this xls will open in the background. you can
access it through the Visual Basic Editor.



All times are GMT +1. The time now is 02:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com