+ Reply to Thread
Results 1 to 2 of 2

macro that loops through a given range of sheets is freezing

  1. #1
    Registered User
    Join Date
    03-24-2013
    Location
    Apple Valley, MN
    MS-Off Ver
    Excel 2010
    Posts
    29

    macro that loops through a given range of sheets is freezing

    I got a similar macro off a forum and adjusted it for my needs. When I first ran it it worked but then crashed excel and I had to go looking for the macro again because I hadn't saved it. Now I must have entered it different because it doesn't work but just freezes excel. I am using Excel 97.
    Also what can I add to make it select a blank cell like "K9" before it loops on to the next sheet. The usual code to do that isn't working.
    Please Login or Register  to view this content.
    Here is the macro
    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor AlvaroSiza's Avatar
    Join Date
    09-19-2007
    Location
    Staffordshire
    MS-Off Ver
    2007
    Posts
    591

    Re: macro that loops through a given range of sheets is freezing

    Hi Yin,

    You are copying a range and then immediately pasting that range to the same (range) location. This schema then continues @ Range("B6:G39") for each ws.

    ~as
    Perhaps it was the Noid who should have avoided me...
    If you are satisfied with my solution click the small star icon on the left. Thanks
    1. Make a copy of your workbook and run the following code on your copy (just in case)
    2. With excel open, press ALT+F11 to open the Visual Basic Editor (VBE). From the "Insert" menu, select "Module".
    3. Paste the code from above into the empty white space. Close the VBE.
    4. From the developer tab, choose "Macros", select the Sub Name, and click "Run".

+ 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