Run macro without opening workbook

tryme2
06-15-2010, 05:48 AM
Hi,

I have made a few short macros for excel in VBA to manipulate data, hide sheet tabs etc. and have added them to a custom toolbar.

The problem is that every time I need to use these, Excel first has to open the worksheet that they are in. I added a workbook.close to the end of each macro, but if VBA editor is open it takes quite a few seconds to open and close the workbook each time I want to use it.

My question is, is there any way to run these macros without opening the workbook that contains them? Eg to put them into excel as macros accessible from any open file without them actually being in a workbook.

Any help greatly appreciated

Colin Legg
06-15-2010, 06:02 AM
Hi,

The container workbook does have to be open, but you could have the procedures in personal.xls or in an add-in, so that it is effectively "hidden" from the main user interface.

tryme2
06-15-2010, 08:11 AM
Thanks, that worked fine, I did it as an add in (did not know those existed).

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum