+ Reply to Thread
Results 1 to 2 of 2

How to run same code (VBA) for other sheet of a work book?

  1. #1
    Registered User
    Join Date
    06-08-2012
    Location
    USA
    MS-Off Ver
    2010
    Posts
    2

    How to run same code (VBA) for other sheet of a work book?

    Greetings,

    This is my VBA for 1st sheet of my workbook,
    It is in the Module 1
    Please Login or Register  to view this content.

    Also I have
    Please Login or Register  to view this content.
    In worksheet (a) Selection change of Excel Object.

    My question is how I can to "RUN" same VBA for other 7 sheets (b - h) of same workbook ?

    Thanks for your help
    Last edited by maftoun; 06-12-2012 at 03:38 PM. Reason: Use code tags in future.

  2. #2
    Forum Contributor wallyeye's Avatar
    Join Date
    05-06-2011
    Location
    Arizona
    MS-Off Ver
    Office 2010, 2007
    Posts
    308

    Re: Vba

    You have two lines:

    Please Login or Register  to view this content.
    Just remove them, and copy the worksheet_selectionchange event to each of the worksheets you need the functionality on. Since you are already on the worksheet, you don't need to select it. Also, I normally don't select sheets (or cells) any more than necessary, it slows down VBA quite a bit.

+ 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