Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have some code that updates the statusbar with the row number being
processed. Sometimes this update freezes but the code keeps running. Is there a way to force the statusbar to update all the time? For example For r = 1 to 60000 application.statusbar "processing row " & r next will freeze. I've tried doing it every 10, 20, 100 rows and it will still freeze. I can do a ctl-break and resume, but I don't want users to do that obviously. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You could try adding doEvents in your code. It'll allow the operating system a
little time to do what it needs to do. You could even do it every so often (depending on what else you do in your real loop). Dim r As Long For r = 1 To 60000 Application.StatusBar = "processing row " & r If r Mod 50 = 0 Then DoEvents End If Next r Robert Flanagan wrote: I have some code that updates the statusbar with the row number being processed. Sometimes this update freezes but the code keeps running. Is there a way to force the statusbar to update all the time? For example For r = 1 to 60000 application.statusbar "processing row " & r next will freeze. I've tried doing it every 10, 20, 100 rows and it will still freeze. I can do a ctl-break and resume, but I don't want users to do that obviously. -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Dave. I ust did what you suggested. And added a lot of different
screen activity. I ended up doing something like: if rnd() .995 then statusbar and doevents and select cell end if which kept the screen changing. Problably slowed things down by 10-20% but no one will complain. Bob "Dave Peterson" wrote in message ... You could try adding doEvents in your code. It'll allow the operating system a little time to do what it needs to do. You could even do it every so often (depending on what else you do in your real loop). Dim r As Long For r = 1 To 60000 Application.StatusBar = "processing row " & r If r Mod 50 = 0 Then DoEvents End If Next r Robert Flanagan wrote: I have some code that updates the statusbar with the row number being processed. Sometimes this update freezes but the code keeps running. Is there a way to force the statusbar to update all the time? For example For r = 1 to 60000 application.statusbar "processing row " & r next will freeze. I've tried doing it every 10, 20, 100 rows and it will still freeze. I can do a ctl-break and resume, but I don't want users to do that obviously. -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I'm not sure why you're selecting the cell. There's not that many things that need to have a specific cell selected. And don't forget to turn calculation to manual, screenupdating to off, do the work, calc back to automatic (or whatever it was before) and screenupdating to on. Robert Flanagan wrote: Thanks Dave. I ust did what you suggested. And added a lot of different screen activity. I ended up doing something like: if rnd() .995 then statusbar and doevents and select cell end if which kept the screen changing. Problably slowed things down by 10-20% but no one will complain. Bob "Dave Peterson" wrote in message ... You could try adding doEvents in your code. It'll allow the operating system a little time to do what it needs to do. You could even do it every so often (depending on what else you do in your real loop). Dim r As Long For r = 1 To 60000 Application.StatusBar = "processing row " & r If r Mod 50 = 0 Then DoEvents End If Next r Robert Flanagan wrote: I have some code that updates the statusbar with the row number being processed. Sometimes this update freezes but the code keeps running. Is there a way to force the statusbar to update all the time? For example For r = 1 to 60000 application.statusbar "processing row " & r next will freeze. I've tried doing it every 10, 20, 100 rows and it will still freeze. I can do a ctl-break and resume, but I don't want users to do that obviously. -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2003 freeze panes won't freeze top row only | Excel Discussion (Misc queries) | |||
Application.StatusBar or equivalent for user defined functions | Excel Programming | |||
Statusbar | Excel Programming | |||
Application.StatusBar not refreshing after ThisWorkbook.Close | Excel Programming | |||
How to reset the Application.StatusBar | Excel Programming |