+ Reply to Thread
Results 1 to 5 of 5

VBA code is very slow

  1. #1
    Registered User
    Join Date
    05-09-2017
    Location
    Ostrava
    MS-Off Ver
    2016
    Posts
    36

    Post VBA code is very slow

    Hi!

    I need to help with VBA code.

    I use it for coloring cell if contains some value from case selection.

    The range is very large and my pc is vely slow.

    Please help me with simplifying VBA code.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: VBA code is very slow

    Im not sure if the change to the background color is seen as a Change event but just in case, add
    Please Login or Register  to view this content.
    after the Dim lines

    and

    Please Login or Register  to view this content.
    Before the End Sub

    Would this not be better done with Conditional Formatting though?
    Last edited by pjwhitfield; 02-07-2018 at 09:10 AM.
    If someone has helped you then please add to their Reputation

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: VBA code is very slow

    Why loop all the way each time changed?
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    05-09-2017
    Location
    Ostrava
    MS-Off Ver
    2016
    Posts
    36

    Re: VBA code is very slow

    Quote Originally Posted by jindon View Post
    Why loop all the way each time changed?
    Please Login or Register  to view this content.
    Good comment, but I do not know how to edit this code to work properly.

    Can you help me with that?

  5. #5
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: VBA code is very slow

    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).

+ 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. [SOLVED] VBA code help (current code too slow and freezes)
    By xxsinghxx in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-13-2017, 05:22 PM
  2. Slow code- making code more efficient
    By ammartino44 in forum Excel General
    Replies: 4
    Last Post: 05-06-2015, 12:47 PM
  3. Please Help With Slow VBA Code
    By chrisj4269 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-05-2014, 05:39 AM
  4. [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
  5. Why is this code slow?
    By foxguy in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-16-2010, 02:05 PM
  6. [SOLVED] Better Way To Do This SLOW code
    By rshow1971@frontiernet.net in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-27-2006, 04:30 AM

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