View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Stefano[_2_] Stefano[_2_] is offline
external usenet poster
 
Posts: 21
Default Rows().AutoFit starts a calculation, but Columns().AutoFit doesn't

This example copied from the help of the WorkSheet.Calculate event works well:
Private Sub Worksheet_Calculate()
Columns("A:F").AutoFit
End Sub

But it loops forever when I replace it with:
Private Sub Worksheet_Calculate()
Rows("10:20").AutoFit
End Sub

It looks like resizing the rows (even rows outside the UsedRange) causes the
volatile functions to be calculated, while resizing the columns doesn't.

Does it make sense?
How can I resize the rows after a calculation?

Thanks,
Stefano