hindersaliva
asked on
Excel 2013 shape height change display mystery
I'm trying to understand this. I have a shape that I want to animate its height growing. Like this
BUT, the shape does not change height during the For-Next loop, but it updates the display only when the code has finished running. (Note the 'slow down')
I tried Application.ScreenUpdating = True but had no effect.
My simple animation test should work, right?
Sub ShapeHeightAnimation()
Dim Total As Double
ActiveSheet.Shapes("Rectangle 1").Height = 0
For i = 1 To 100
ActiveSheet.Shapes("Rectangle 1").Height = i
'slow down
For iRow = 1 To 8000
Total = Total + Sheet2.Cells(iRow, 1).Value / 1000
Next iRow
Next i
End Sub
BUT, the shape does not change height during the For-Next loop, but it updates the display only when the code has finished running. (Note the 'slow down')
I tried Application.ScreenUpdating
My simple animation test should work, right?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.