+ Reply to Thread
Results 1 to 4 of 4

Looping Macro through Specific Worksheets

  1. #1
    Registered User
    Join Date
    10-22-2015
    Location
    Oneonta, ny
    MS-Off Ver
    2010
    Posts
    30

    Cool Looping Macro through Specific Worksheets

    Hello,

    I've searched online for a macro that will repeat itself for all worksheets. What I have so far will loop through all the worksheets but I have to click on a message box to continue to the next worksheet. Even though I run this, it doesn't replace everything that needs to be replaced either. Any advice for getting this to loop correctly? I don't need it to search my two tabs that are titled "Srch" and "Rand". If it's possible to avoid those, it would be appreciated.

    Please Login or Register  to view this content.
    In case you're wondering, I'm creating a cypher and it won't work if the user runs the VBA code to Find All of symbols so I've temporarily replaced these symbols with a letter and a number and set it to replace these.

    Thanks,
    ~BBS
    Last edited by MsBBStacker; 11-30-2015 at 11:02 AM.

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,937

    Re: Looping Macro through Specific Worksheets

    Hi, the messagebox is aa question of deleteng that line of code, but the way you have written your code, well, that's not the way, there may be many ways to do this but this one works and ignores the two worksheets named "Srch" and "Rand"
    Please Login or Register  to view this content.
    Hope this one helps. I tested it and it replaced the values I placed
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645

    Re: Looping Macro through Specific Worksheets

    Try this.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  4. #4
    Registered User
    Join Date
    10-22-2015
    Location
    Oneonta, ny
    MS-Off Ver
    2010
    Posts
    30

    Re: Looping Macro through Specific Worksheets

    Thanks for the answers and I do appreciate the help. Will try it now.

    Edit:

    Both worked great! Thanks! Norie, how does your code work if you don't mind me asking. I've been searching VBA tutorials for different ways to work with VBA but I haven't seen anything like your code yet. My current problem is just trying to figure out how each command works without getting stuck in a never-ending loop (accidently added one and had to ctrl alt del out of excel.
    Last edited by MsBBStacker; 11-30-2015 at 10:56 AM. Reason: Just added to the original version.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Looping through specific worksheets
    By gsandy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-01-2015, 03:52 PM
  2. Macro to email specific worksheets to specific recipients
    By LeanAccountant in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-10-2015, 12:22 PM
  3. Need help in looping of Macro between cells and worksheets
    By Manish_Gupta in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-04-2013, 06:07 PM
  4. Macro looping through several worksheets in one workbook
    By awcwa in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-04-2013, 05:26 PM
  5. Problems with looping macro through specific folder
    By kchm_2000 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 09-09-2012, 07:00 AM
  6. Fill down macro looping through all worksheets
    By jeffreybrown in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-24-2010, 08:11 PM
  7. looping through specific worksheets
    By simora in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-28-2005, 08:05 PM

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