+ Reply to Thread
Results 1 to 3 of 3

VBA Code slowing down active sheet

  1. #1
    Registered User
    Join Date
    05-04-2018
    Location
    Sydney, Australia
    MS-Off Ver
    2016
    Posts
    65

    VBA Code slowing down active sheet

    Hi Forum.. I have the below codes in one of my sheet in Excel. I have noticed that the scrolling up and down or across the sheet have slowed down. Everytime I click a cell in this sheet, I see excel runs a Calculation in bottom. I have VBA code affecting only till column G but even if I click in a cell in column H or AB, the sheet does performs a calculation. Is this thing normal with a sheet running VBA or I have used a wrong code. I am new to VBA and used code that I found online in different forums suiting my need.

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Last edited by pchugh; 05-23-2018 at 01:49 AM.

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,879

    Re: VBA Code slowing down active sheet

    Please Login or Register  to view this content.
    You may try to switch of event handler for the time of changing values, like:

    Please Login or Register  to view this content.


    Here you change 2 cells values always when you select any cell. So excel always fires Recalculation (probably it is set to automatic)

    PS. Please edit your post above and use code tags. I assume that with 20+ posts experience you are well aware of our Rule 3:

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Click on Edit to open your thread, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here
    Best Regards,

    Kaper

  3. #3
    Registered User
    Join Date
    05-04-2018
    Location
    Sydney, Australia
    MS-Off Ver
    2016
    Posts
    65

    Re: VBA Code slowing down active sheet

    Hi Kaper. I have edited my code as per your suggestions but the performance of the sheet is still the same. I am not sure why excel performs calculation clicking on every cell in that sheet.
    If I switch to Manual calculation option then this sheet becomes fast and there is no delay but then the whole purpose of VBA is waste as no calculation works.
    I am not sure how this can be addressed.

+ 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] Setting Print area with VBA code on active sheet - Can't get my code to work
    By hans302 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-14-2017, 05:07 AM
  2. [SOLVED] Why is this code drastically slowing down my machine?
    By OpieWinston in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-31-2017, 09:43 AM
  3. VBA code is slowing down the worksheet function
    By bala04msw in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-07-2016, 09:09 AM
  4. vba code slowing things down.
    By Zimmerman in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-05-2015, 11:19 AM
  5. Why this code is slowing down
    By TheMaciej in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-31-2013, 01:11 AM
  6. VBA code slowing up worksheet
    By dsrt16 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-25-2009, 05:40 PM
  7. a few questions about slowing code and its quality
    By robbi100 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 01-10-2009, 02:26 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