+ Reply to Thread
Results 1 to 6 of 6

Vba code makes workboos slow. Any alternate code ??

  1. #1
    Forum Contributor satputenandkumar0's Avatar
    Join Date
    11-08-2012
    Location
    Pune, India
    MS-Off Ver
    Office xp & Office 2007
    Posts
    398

    Lightbulb Vba code makes workboos slow. Any alternate code ??

    Dear members,

    I am using below event code to highlight current row (With Borders) from A column to R column . But if file have large data then this code make workbook slow. Is there any alternate code for same ?

    Please Login or Register  to view this content.

    Any help may appreciated.

    Thanks
    Regards,
    Nandkumar S.
    ---------------------------------------------------------------
    Don't forget to Click on * if you like my solution.

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Vba code makes workboos slow. Any alternate code ??

    Hi, I think it is better to use conditional formatting like:
    =ROW(A1)=ROW(INDIRECT(CELL("address")))
    apply it to the range you want it to work for with A1 active.

    You need to recalculate when you change selection which you can do using:
    Please Login or Register  to view this content.
    in the worksheet object, this also has the advantage of still allowing use of the undo tool.

  3. #3
    Forum Contributor satputenandkumar0's Avatar
    Join Date
    11-08-2012
    Location
    Pune, India
    MS-Off Ver
    Office xp & Office 2007
    Posts
    398

    Re: Vba code makes workboos slow. Any alternate code ??

    Dear sir,

    Thanks for quick reply,

    Please give me steps for conditional formatting as I am using office 2007.

  4. #4
    Forum Contributor satputenandkumar0's Avatar
    Join Date
    11-08-2012
    Location
    Pune, India
    MS-Off Ver
    Office xp & Office 2007
    Posts
    398

    Re: Vba code makes workboos slow. Any alternate code ??

    Yes works nice

    I have small problem. I there any way (I mean Formula) to highlight only A:R instead of entire row.
    Last edited by satputenandkumar0; 04-22-2014 at 09:57 AM.

  5. #5
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Vba code makes workboos slow. Any alternate code ??

    Hi - only apply the conditional format to columns A:R, not the entire worksheet.

  6. #6
    Forum Contributor satputenandkumar0's Avatar
    Join Date
    11-08-2012
    Location
    Pune, India
    MS-Off Ver
    Office xp & Office 2007
    Posts
    398

    Re: Vba code makes workboos slow. Any alternate code ??

    Oh ! How stupid I am.....

    Any way Thanks for helping.

    rep added to you

+ 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. Copy template, rename it and makes som code alterations automatically
    By yusaef in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-28-2014, 01:20 PM
  2. Macro is running real slow and makes navigating the worksheet really slow after execution.
    By MichWolverines in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-03-2013, 04:29 PM
  3. [SOLVED] Multiple Results of Vlookup() - Alternate [VBA Code]
    By lloydgodin in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-04-2012, 10:36 AM
  4. BeforeSave code makes excel crash every time
    By keb in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-05-2011, 03:04 PM
  5. adjusting code to use alternate cell ranges
    By simpo067 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-06-2009, 03:34 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