pistonbroke
New Member
- Joined
- Jan 15, 2003
- Messages
- 49
Hello all. Sorry - this is a bit drawn out.... I have a large 2 sheet database and a macro that compares matched cell info on each line of each sheet. On finding a match the macro tabulates the findings (departmentises each group). All works great. I also have a progress bar (in smoothed mode) that sets it's max value initially, as the value of the last row in the first sheets data. On each of (5000 +) lines "fmImport_Progress.pb1.Max = PB", additionally as each line is looked up, that value (line number), acts as the progress bar value, and i get a smoothly operating progress bar till the final row is reached (100%). However i would also like to show %complete, which i do with a label, but the label % complete value only shows if i turn on Screen Updating in code, but then the screen of course flashes for the duration and the smooth progress bar gets erratic visually.... How can i make the Label showing % progress, update as the macro runs whilst having Screen Updating turned off in code ? Thanks for any help.
Here's a bit of the code, where fmImport_Progress is the user form, and pb1 is the Progress Bar
"fmImport_Progress.Show
fmImport_Progress.pb1.Max = PB
For R = 1 To PB
Pcent = Format((R / PB), "0.0%")
fmImport_Progress.lbPB1.Caption = Pcent
fmImport_Progress.pb1.Value = R
Here's a bit of the code, where fmImport_Progress is the user form, and pb1 is the Progress Bar
"fmImport_Progress.Show
fmImport_Progress.pb1.Max = PB
For R = 1 To PB
Pcent = Format((R / PB), "0.0%")
fmImport_Progress.lbPB1.Caption = Pcent
fmImport_Progress.pb1.Value = R