Thread: Progress
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone[_2_] Jim Cone[_2_] is offline
external usenet poster
 
Posts: 1,549
Default Progress

'Add the following...
Set rng = Application.Intersect(Selection, _
Selection.SpecialCells(xlConstants, xlTextValues))
NumCells = rng.Count

'Replace this...
For Each cell In Intersect(Selection, _
Selection.SpecialCells(xlConstants, xlTextValues))
cell.Value = Application.Trim(cell.Value)
Next cell

'With this...
For Each cell In rng.Cells
cell.Value = Application.Trim(cell.Value)
NumCount = NumCount + 1
Call UpdateProgress(NumCount/NumCells)
Next cell
--
Jim Cone
Portland, Oregon USA



"Basta1980"

wrote in message
Jim,
I suppose
Everything = TheDoughnut.Cells.Count
For Each Hole in TheDoughNut.Cells
'Take a bite
Bite = Bite + 1
AmountEaten = Bite/Everything
Call UpdateProgress(AmountEaten)
Next

Comes in the sub Main()?!
Regards Bas