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
|