Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Wed, 16 Jul 2008 20:02:26 -0500, Dave Peterson
wrote: Selection.rows.autofit will work on all the rows in the current selection. Not just the row with the activecell. So you could select multiple rows before you run that code. If you want to autofit rows 2 to whatever, you could use: with activesheet .rows("2:" & .rows.count).autofit end with <sigh Perfect! Thank you so much. Another piece of code to add to my Tips folder, too! <g Thanks and cheers. :oD StargateFanNotAtHome wrote: I've tried: Selection.Rows.AutoFit and ActiveSheet.Rows.AutoFit Selection.Rows.AutoFit only affects the active row one is on, which is not enough. But the ActiveSheet one affects the entire sheet, which would be okay if there were no header row. Is there a way to get the macro fine-tuned to ignore the header row, by any chance? Thanks! :oD (XL2003) -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to affect all sheets | Excel Discussion (Misc queries) | |||
Autofit (Columns.EntireColumn.AutoFit) does not work | Excel Discussion (Misc queries) | |||
How do I stop Macro from affect other Workbooks | Excel Programming | |||
How can I Run a query from VB macro with out affect current data in the same sheet? | Excel Discussion (Misc queries) | |||
Add-In - OnAction Can't Find Macro & Subs Doesn't Affect Current Wkb | Excel Programming |