Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Autofit
If I'm in an Excel spreadsheet I can click the button between column label A
and row label 1 to select the entire worksheet. Then I can double click in between any column and all the columns will autofit to the best fit. How can achieve this affect using VBA code? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Autofit
This is exactly what you get when you use the macro recorder.
Sub fit() Cells.Select Selection.Columns.AutoFit End Sub Gord Dibben MS Excel MVP On Tue, 27 Apr 2010 16:11:01 -0700, Bishop wrote: If I'm in an Excel spreadsheet I can click the button between column label A and row label 1 to select the entire worksheet. Then I can double click in between any column and all the columns will autofit to the best fit. How can achieve this affect using VBA code? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Rows().AutoFit starts a calculation, but Columns().AutoFit doesn't | Excel Programming | |||
Rows().AutoFit starts a calculation, but Columns().AutoFit doesn't | Excel Programming | |||
Autofit | Excel Programming | |||
Autofit (Columns.EntireColumn.AutoFit) does not work | Excel Discussion (Misc queries) | |||
autofit does not autofit | Excel Discussion (Misc queries) |