View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Rech Jim Rech is offline
external usenet poster
 
Posts: 2,718
Default EXCEL "EntireColumn.AutoFit" Help!

That code would only affect one worksheet in the workbook so it's not the
best answer. To have it work on all sheets in the workbook open the
"ThisWorkbook" module for the workbook in the VBE's Project window and paste
in this code:

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Sh.Columns.AutoFit
End Sub


--
Jim Rech
Excel MVP