+ Reply to Thread
Results 1 to 8 of 8

How to Clean Recorded Macro

  1. #1
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,065

    How to Clean Recorded Macro

    I often use the macro recorder to record a macro, and since I work on huge worksheets I wind up with a lot of "ActiveWindow.ScrollRows..." lines, which I then go and manually delete. I figured someone would have some type of automated routine to clean up this code without having to do it manually, and have looked for it online with no luck. I tried a "Replace" by putting this in the "Replace" field:
    Please Login or Register  to view this content.
    but it couldn't find any results. Does anyone know a better way than just manually deleting each line?

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    Win10/MSO2016
    Posts
    12,971

    Re: How to Clean Recorded Macro

    Please Login or Register  to view this content.
    Ben Van Johnson

  3. #3
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,065

    Re: How to Clean Recorded Macro

    ProtonLeah, Sorry it's taken me so long to reply; our email has been flaky, and wouldn't accept email from anyone outside our agency since Monday, so I just go the reply today. I tried using the string you posted, and got a "not found" when I tried a "Replace". Any other ideas?

  4. #4
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,065

    Re: How to Clean Recorded Macro

    Bumping up, still in need of a solution.

  5. #5
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,065

    Re: How to Clean Recorded Macro

    Bumping up again.

  6. #6
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,065

    Re: How to Clean Recorded Macro

    And once more.

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: How to Clean Recorded Macro

    Tick Use Pattern Matching
    Entia non sunt multiplicanda sine necessitate

  8. #8
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,065

    Re: How to Clean Recorded Macro

    A-ha! The lightbulb turns on! So instead of simply putting
    Please Login or Register  to view this content.
    in my "Find What" field, I need to also check off the "Pattern Matching". Pretty easy once you know how.

    Thanks so much!

+ 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