Worksheets and Macros
Eliminate Pivot Table Annoyances
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: Worksheets and Macros

  1. #1
    New Member
    Join Date
    Apr 2002
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    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. #2
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Sydney, Australia
    Posts
    2,936
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    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

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com