+ Reply to Thread
Results 1 to 4 of 4

Macro is using 51% CPU and I don't know why.

  1. #1
    Registered User
    Join Date
    10-07-2007
    Posts
    2

    Macro is using 51% CPU and I don't know why.

    I originally created 7 macros to automate certain repetitive actions.

    I created a new macro to run all the other macros if I so desired.

    I then noticed that my screen became jerky and slow cursor movement whilst using this spreadsheet.

    On investigation, I found one of the macros was the culprit but I am at a loss to explain why. It increases the CPU usage from 1% to 51% and remains that way until I shut the spreadsheet down.

    I know the code is amateurish and I apologise in advance. However, I would appreciate any help to isolate where the increase and sustained CPU usage is coming from.

    Thankyou

    The following is the code:

    Please Login or Register  to view this content.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    You really need to edit recorded macros, unnecessary Selecting etc will slow down your code. I think I have followed what you are doing and amended the code

    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    10-07-2007
    Posts
    2

    Thumbs up

    Roy,

    I understand a little better now. It will still need some tweaking as the row length is variable (hence selecting a full column) but I will soldier on.

    Thank you for your time and effort.

    Nick

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Why does the Row length determine that you need a full column?

    Maybe an explanation of what you are attempting might give us a chance to offer a better solution.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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