View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tim Tim is offline
external usenet poster
 
Posts: 408
Default Autofit column Help?

Hi there,
The code below works great ... BUT ... I need it to apply to only columns G
and H ...PLUS ... I would like to make this across the 25 worksheets I have.
Any ideas?
Thanks very much.
Private Sub Worksheet_Change(ByVal Target As Range)
Me.Application.ActiveWorkbook.RefreshAll
Target.EntireColumn.AutoFit

On Error Resume Next
Target.Dependents.EntireColumn.AutoFit
End Sub