+ Reply to Thread
Results 1 to 3 of 3

Run Macro only on Certain Worksheets

  1. #1
    Registered User
    Join Date
    11-02-2010
    Location
    Cirencester, England
    MS-Off Ver
    Excel 2003
    Posts
    38

    Run Macro only on Certain Worksheets

    Hi,

    I have a Macro which is designed to run only through certain worksheets. However I need the Macro to also run on copied Worksheets without the need to update the Global Update Macro with the new Sheet Numbers/Names to run the code through.

    At the moment I am trying to use a Named Range I.e. RFModulesIdentifier and the idea being the Macro looks for this named range on each Worksheet and if it doesn't find it for it to move onto the next Worksheet and look for this named range. Please view my current macro below and advise of any possible changes:

    Please Login or Register  to view this content.
    Any advice will be greatly appreciated!

    Many thanks,

    Harry Seager

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Run Macro only on Certain Worksheets

    Yor code appears to work on all sheets & there is no need to activate the sheets
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Run Macro only on Certain Worksheets

    Another approach maybe?
    This should only trigger your macro "PricelistChange_RF" on the sheets and copies where the name "RFModulesIdentifier" exists.
    This only searches the names in the workbook, i.e. not every sheet.

    I have activated the sheets as they are found because I don't know what your macro refers to. (ActiveSheet or Specified Sheets.)
    Please Login or Register  to view this content.

    Hope this helps
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1