Autofit row height in only some rows

J

JStiehl

Is it possible to change this macro to only autofit the row height on rows
254-332 in the workbook? I am using this macro:

Option Explicit
Private Sub Workbook_SheetCalculate(ByVal Sh As Object)
Application.EnableEvents = False
Sh.Rows.AutoFit
Sh.Rows("1.33").AutoFit
Application.EnableEvents = True
EndSub

Thanks in advance for your help.
 
P

p45cal

VBA Code:
--------------------


Option Explicit
Private Sub Workbook_SheetCalculate(ByVal Sh As Object)
Application.EnableEvents = False
Sh.Rows("254:332").AutoFit
Application.EnableEvents = True
EndSub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top