![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 10
|
Is there any way to make a Macro only relevant to one worksheet? Ie. the macro will only work when the user is on that worksheet.
Cheers s=t=i=f=f=r=i=m=p=e=t |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Sydney, Australia
Posts: 2,908
|
Hi,
You could try something like this:- If ActiveSheet.Name <> "YourSheetName" Then Exit Sub Where you'll need to substitute YourSheetName with the name of your worksheet. HTH, Dan |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|