Results 1 to 8 of 8
  1. #1
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    All or nothing (Excel 97-->)

    I'll start here as Excel is where I first identified the problem, feel free to move.

    Last night I was running a piece of code in Excel that was very CPU hungry, the screen was flashing the calculations and updates at a dramatic rate so I decided to set the screen update to false. The code took about 45 minutes to run...... During the first few minutes I decided to look at the Task manager and noted that the processor was working at 100%. Beginning to get bored I thought I would listen to some music, this obviously used more processing power and the screen refresh rate went down hill dramatically.

    My question is, is there a way that when running a piece of code in Excel ( or any other VBA/VB code) can you assign, say 80%, of the processor to the task leaving 20% for use by other programmes so you can multi task ( not necessarily music!)
    Jerry

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: All or nothing (Excel 97-->)

    Which version of Windows?

  3. #3
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: All or nothing (Excel 97-->)

    Hi Hans

    Windows XP professional

    Office XP

    1.80 Ghz Processor

    512 Mb Ram
    Jerry

  4. #4
    3 Star Lounger
    Join Date
    Nov 2004
    Location
    Nottingham, Nottinghamshire, United Kingdom
    Posts
    326
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: All or nothing (Excel 97-->)

    Not sure if this will do exactly what you want Jezza, but if you're using Win 2k or XP you can use the task manager to assign different priorities to certain tasks. Press CTRL-ATL-DEL and choose Task Manager. From there, click on the 'processes' tab. Find your process (in this case excel.exe), right-click on it and select 'set priority'.

    NOTE: Never choose 'real time' as an option as it can completely lock your system
    <font color=448800><font face="Comic Sans MS"><big>Lyra J </font color=448800></font face=comic></big>
    <img src=/S/flags/UK.gif border=0 alt=UK width=30 height=18> Ducking the arrows in Robin Hood country <IMG SRC=http://www.wopr.com/w3tuserpics/Lyra_J_sig.gif ALT="No, Admins, no! I'm sorry, okay!" title="No, Admins, no! I'm sorry, okay!">

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: All or nothing (Excel 97-->)

    Since you're using XP Pro, you should be able to use Lyra_J's reply.

  6. #6
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: All or nothing (Excel 97-->)

    Thanks Lyra

    It's like an onion, I hadn't even realised that was there, brilliant.

    I shall go home to night and test this and see the difference.

    <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>
    Jerry

  7. #7
    3 Star Lounger
    Join Date
    Nov 2004
    Location
    Nottingham, Nottinghamshire, United Kingdom
    Posts
    326
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: All or nothing (Excel 97-->)

    No probs. Did it work ok for you?
    <font color=448800><font face="Comic Sans MS"><big>Lyra J </font color=448800></font face=comic></big>
    <img src=/S/flags/UK.gif border=0 alt=UK width=30 height=18> Ducking the arrows in Robin Hood country <IMG SRC=http://www.wopr.com/w3tuserpics/Lyra_J_sig.gif ALT="No, Admins, no! I'm sorry, okay!" title="No, Admins, no! I'm sorry, okay!">

  8. #8
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: All or nothing (Excel 97-->)

    Hi Lyra

    Thanks for checking. Yes it did work, not quite what I was expecting, but still did good job. I was aware of the Task Manager , just not the right hand mouse click part to set the priority.

    What I found ( I know you know this but have added it to allow others the benefit of my experience) is that while the Excel programme is running and you open up another application, the Excel programme stutters or halts temporarily and then carries on regardless. My VBA routine was not time critical so it was nice to have running it in the background whilst I got on with more interesting things (like listening to music <img src=/S/groovin.gif border=0 alt=groovin width=21 height=21> )
    Jerry

Posting Permissions

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