+ Reply to Thread
Results 1 to 10 of 10

Macro wont run on all sheets in active workbook

  1. #1
    Registered User
    Join Date
    09-24-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2007
    Posts
    19

    Macro wont run on all sheets in active workbook

    I have searched these forums for help on this and tried many of the suggestions given, none of witch has helped. The macro runs on the active sheet but not on all of them. Here is the code Im using.

    Please Login or Register  to view this content.
    Last edited by afpPaul; 12-18-2012 at 04:06 AM.

  2. #2
    Forum Contributor
    Join Date
    09-05-2012
    Location
    It's more fun in the Philippines :D
    MS-Off Ver
    Excel 2007
    Posts
    209

    Re: Macro wont run on all sheets in active workbook

    @afpPaul

    Please use code tags on your posts. Try this one.

    Please Login or Register  to view this content.
    Regards,
    thisisgerald
    Don't forget to mark your thread as [SOLVED].

  3. #3
    Registered User
    Join Date
    09-24-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Macro wont run on all sheets in active workbook

    Thank You For the speedy response, Using your modified code I get a "Create Table" window asking me to select the data for my table.
    Attached Images Attached Images

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro wont run on all sheets in active workbook

    Please edit your post #1 and add the code tags as required by the forum rules. No more posts until you edit that post. Thank you for complying.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  5. #5
    Registered User
    Join Date
    09-24-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Macro wont run on all sheets in active workbook

    Sorry I am New To Forums. I think I have made the required changes.

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro wont run on all sheets in active workbook

    Like so:

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    09-24-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Macro wont run on all sheets in active workbook

    Thank You for the reply. This code works but only on the active sheet. If I click on another sheet and run the macro it works on this sheet only. I need the code once called to run on all the sheets in the workbook.

  8. #8
    Forum Contributor
    Join Date
    09-05-2012
    Location
    It's more fun in the Philippines :D
    MS-Off Ver
    Excel 2007
    Posts
    209

    Re: Macro wont run on all sheets in active workbook

    @afpPaul

    Try to replace this code
    Please Login or Register  to view this content.
    with

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    09-24-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Macro wont run on all sheets in active workbook

    Thank You So Much Gerald! You are the best. This works perfect.

  10. #10
    Forum Contributor
    Join Date
    09-05-2012
    Location
    It's more fun in the Philippines :D
    MS-Off Ver
    Excel 2007
    Posts
    209

    Re: Macro wont run on all sheets in active workbook

    @afpPaul

    You're welcome! I'm only good. Our moderators are the best.

    Warm Regards,
    thisisgerald

+ 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