Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Gord
Thanks - absolutely right. I'm afraid my question used some sloppy terms. V "Gord Dibben" <gorddibbATshawDOTca wrote in message ... You keep referring to stats.xls as a "sheet" stats.xls is workbook, not a worksheet. In your code, point the macro to Thisworkbook and whatever sheet in the workbook you want to run the macro upon. Gord Dibben MS Excel MVP On Tue, 20 Oct 2009 23:31:06 +0100, "Victor Delta" wrote: I have a macro which applies to, and is recorded within, one specific spreadsheet, says, stats.xls. I have linked it to a custom button and it works well. However, I usually have several spreadsheets open simultaneously and occasionally I inadvertently run hit the button and run the macro even when I am working on one of the other sheets. This is not disastrous but is there a way I can add some code to the macro so that it will only run when stats.xls is the active sheet 'at the front'. Thanks, V |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
diable macro if a certain sheet is active | Excel Discussion (Misc queries) | |||
emailing active sheet with macro | Excel Worksheet Functions | |||
macro active sheet | Excel Discussion (Misc queries) | |||
copy name from active sheet to cell - using macro or function | Excel Worksheet Functions | |||
How to change macro so it performs actions on ACTIVE sheet? | Excel Discussion (Misc queries) |