+ Reply to Thread
Results 1 to 6 of 6

VBA code help (current code too slow and freezes)

  1. #1
    Registered User
    Join Date
    01-17-2013
    Location
    Powell, oh
    MS-Off Ver
    Excel 2007
    Posts
    7

    VBA code help (current code too slow and freezes)

    Hi,

    I do these manual steps on daily basis and would like to make the file automated. I tried recording the steps via macro and whenever I run it freezes or takes a long time to complete steps. Can anyone please review this generic code and convert it into a clean, faster, and efficient code? Please

    Thank you for your help with this request in advance!!
    Attached Files Attached Files

  2. #2
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: VBA code help (current code too slow and freezes)

    You can get rid of most of the Select and condense it to the sheet and range.
    So this
    Please Login or Register  to view this content.
    Becomes
    Please Login or Register  to view this content.
    Also, to make a sheet the active sheet, use Activate instead of Select. IMO Select is "highlighting" the sheet whereas Activate just makes the sheet active.
    So this
    Please Login or Register  to view this content.
    Becomes
    Please Login or Register  to view this content.
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

  3. #3
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,937

    Re: VBA code help (current code too slow and freezes)

    Sorry for off-topic interjection:

    Although there is no official rule regarding this behavior, we request that wherever possible both the question AND the answer be provided in substantive detail here within the thread. An attached workbook is an excellent aid for posing a question and offering a solution, but solely doing that with no in thread explanation makes it difficult for researchers to understand or consider the Q & A of this thread without downloading what may be a pointless doc to them, if they can do that at all. Doing that also hides the content from search engines so others may never benefit from this.

    I'm sure you understand, and we look forward to seeing you post your formulas/macros in your posts for the searching benefit of all.

    Thanks again for all your hard work here!
    Ben Van Johnson

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: VBA code help (current code too slow and freezes)

    You appear to have cross posted which means your post does not comply with Rule 8 of our Forum RULES. Do not crosspost your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  5. #5
    Registered User
    Join Date
    01-17-2013
    Location
    Powell, oh
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: VBA code help (current code too slow and freezes)

    I think it was the timing of post. I don't remember which forum I posted first and did not see the post under the new post section so I thought I probably missed a step. But anyhow, thank you for your reply. i will close this post.

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: VBA code help (current code too slow and freezes)

    Quote Originally Posted by xxsinghxx View Post
    I think it was the timing of post. I don't remember which forum I posted first and did not see the post under the new post section so I thought I probably missed a step. But anyhow, thank you for your reply. i will close this post.
    I'm not asking you to close the post. You are welcome to leave it.
    All we ask, for the reason given, is that you acknowledge in all of the forums in which you post the fact that you're asking the question elsewhere.

+ 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. Code works fine when stepping through code but Excel freezes if I run it without stepping
    By OldManExcellor in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-19-2016, 10:39 AM
  2. Slow code- making code more efficient
    By ammartino44 in forum Excel General
    Replies: 4
    Last Post: 05-06-2015, 12:47 PM
  3. [SOLVED] Vba code makes workboos slow. Any alternate code ??
    By satputenandkumar0 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-23-2014, 04:30 AM
  4. Saving VBA Code Freezes Excel
    By amartin575 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-01-2013, 04:11 PM
  5. [SOLVED] Print Preview Freezes my code
    By RedPen in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-20-2012, 07:54 PM
  6. Excel freezes with a certain Worksheet_SelectionChange Code
    By asha3010 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-24-2010, 03:29 PM
  7. Code looping until machine freezes!!?
    By Simon Lloyd in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-14-2005, 08:58 PM

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