+ Reply to Thread
Results 1 to 5 of 5

Delete rows/columns across all worksheets

  1. #1
    Registered User
    Join Date
    06-24-2009
    Location
    Novato, CA
    MS-Off Ver
    Excel 2003
    Posts
    5

    Delete rows/columns across all worksheets

    Hi Guys,

    Newb here and I have spent about 4 hours recording macros (then editing them) searching the web, forums, and I still can't get this macro to run properly.

    I have a single workbook with 55 worksheets. I need to delete rows #1-14, then delete columns A & B on all worksheets. The macro below seems to be running in a loop which appears to delete rows 1-14 and columns A & B until there is no more data left on the active sheet only. It does not run on any of the other sheets - even if I select all sheets before running the macro.

    Please Login or Register  to view this content.
    Thanks in advance!

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Macro to delete rows/columsn across all worksheets

    Hello ncalsurfer,

    Here is the corrected code.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    06-24-2009
    Location
    Novato, CA
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Delete rows/columns across all worksheets

    Thanks Leith,

    I'm getting a compile error: Invalid outside procedure and 'AllSheets' is highlighted.

  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: Delete rows/columns across all worksheets

    Maybe just need the S add to Sub at the very beginning?
    _________________
    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
    06-24-2009
    Location
    Novato, CA
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Delete rows/columns across all worksheets

    Yeah - wow! Thanks guys and sorry for my lazy eyes! Too many hours staring at the comp screen!

    Macro ran like a dream!!!

    Thanks again!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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