Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Giselle
 
Posts: n/a
Default Limiting macros to certain sheets

Hi
Newbie question, I think

I have some macros in my workbook that are activated by <ctrl<shiftA,
<ctrl<shiftB, <ctrl<shiftC, etc. My prob is that they work on EVERY
sheet, but i'd like them to work only on certain designated sheets. Any
ideas how to go about this?

Merci
Giselle


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Paul B
 
Posts: n/a
Default Limiting macros to certain sheets

Giselle, you could check for the sheet name like this,

Sub test()
If ActiveSheet.Name = "Sheet2" Then
'Your Code here
Else
Exit Sub
End If
End Sub



--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"Giselle" wrote in message
...
Hi
Newbie question, I think

I have some macros in my workbook that are activated by <ctrl<shiftA,
<ctrl<shiftB, <ctrl<shiftC, etc. My prob is that they work on EVERY
sheet, but i'd like them to work only on certain designated sheets. Any
ideas how to go about this?

Merci
Giselle




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Autofilter Lists across Multiple Sheets, Maintain Correct Referenc EDSTAFF Excel Worksheet Functions 0 November 14th 05 03:27 PM
In 3 active sheets in wkbk, determine& display the # of sheets that have data wrpalmer Excel Discussion (Misc queries) 1 November 4th 05 02:01 PM
Macros for Protect/Unprotect all sheets in a workbook Paul Sheppard Excel Discussion (Misc queries) 2 August 4th 05 04:30 PM
calculating excel spreadsheet files for pensions and life insurance (including age calculation sheets) RICHARD Excel Worksheet Functions 1 March 15th 05 05:49 PM
Multiple sheets selected twa14 Excel Discussion (Misc queries) 2 December 21st 04 11:15 AM


All times are GMT +1. The time now is 10:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"