Results 1 to 10 of 10

Thread: Running macro slowly

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Sep 2003
    Location
    Slovakia
    Posts
    20

    Angry Running macro slowly

    Hello,
    please can You help me ?
    How I can to reduce running of some actual macro code ?
    Thank You
    Radovan Zigraj

  2. #2
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    Re: Running macro slowly

    Optimise it?

    You'd have to look online for optimisation trick depending on your db.
    Indexes on fields? (slows input slightly but allows faster returning of records).

    When you say Macro .. do you mean vba code? Or Access Macro?
    Perhaps it is the amount of data or the way that you have it structured?

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Sep 2003
    Location
    Slovakia
    Posts
    20

    Re: Running macro slowly

    Sorry,
    I mean macro code in VBA in MS Excel.

  4. #4
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    Re: Running macro slowly

    What are you doing at the moment in excel?

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  5. #5
    Fanatic Member dannymking's Avatar
    Join Date
    Jul 2005
    Location
    Darlington, North East UK
    Posts
    677

    Re: Running macro slowly

    There are a few ways you can try to slow down the code..

    1. Sleep function to pause execution
    2. Empty Loops (Not the best method)
    3. Loop until a certain condition is true.. (the best and most efficient method)

    It will depend on what you are trying to do, so if you could post why you need to slow it down we might be able to give some further information
    Danny

    Never Think Impossible

    If you find my answer helpful then please add to my reputation

  6. #6
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    Re: Running macro slowly

    uhh dnany ... I believe they want to make it run faster (reduce time) ....

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  7. #7
    Fanatic Member dannymking's Avatar
    Join Date
    Jul 2005
    Location
    Darlington, North East UK
    Posts
    677

    Re: Running macro slowly

    Hmm,, the title states running it slowly..
    Danny

    Never Think Impossible

    If you find my answer helpful then please add to my reputation

  8. #8

    Thread Starter
    Junior Member
    Join Date
    Sep 2003
    Location
    Slovakia
    Posts
    20

    Re: Running macro slowly

    My macro code is reading on one sheet row per row and evaluating condition ( if ).
    If this condition is true than macro is going to copy this row and put on another sheet and again activated prevous sheet.
    How I can be sure that were processed all rows ?

  9. #9
    Fanatic Member dannymking's Avatar
    Join Date
    Jul 2005
    Location
    Darlington, North East UK
    Posts
    677

    Re: Running macro slowly

    Ok so now I'm really are you trying to speed up, slow down or validate the process??
    Danny

    Never Think Impossible

    If you find my answer helpful then please add to my reputation

  10. #10
    Frenzied Member DKenny's Avatar
    Join Date
    Sep 2005
    Location
    on the good ship oblivion..
    Posts
    1,171

    Re: Running macro slowly

    Can you post your code, so that we can review it?
    Declan

    Don't forget to mark your Thread as resolved.
    Take a moment to rate posts that you think are helpful

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width