ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Column Widths help ? (https://www.excelbanter.com/excel-programming/314733-column-widths-help.html)

GazMo[_11_]

Column Widths help ?
 

I have a macro that creates new worksheets from a main table ... is
there a line of code that will automatically :confused: set the width
of columns to the widest value ?

Thanks all ...


--
GazMo
------------------------------------------------------------------------
GazMo's Profile: http://www.excelforum.com/member.php...o&userid=14610
View this thread: http://www.excelforum.com/showthread...hreadid=272396


Bob Phillips[_6_]

Column Widths help ?
 
From the macro recorder

Columns("E:E").EntireColumn.AutoFit

--

HTH

RP

"GazMo" wrote in message
...

I have a macro that creates new worksheets from a main table ... is
there a line of code that will automatically :confused: set the width
of columns to the widest value ?

Thanks all ...


--
GazMo
------------------------------------------------------------------------
GazMo's Profile:

http://www.excelforum.com/member.php...o&userid=14610
View this thread: http://www.excelforum.com/showthread...hreadid=272396




Mike Fogleman

Column Widths help ?
 
Have you tried Columns.AutoFit ?
"GazMo" wrote in message
...

I have a macro that creates new worksheets from a main table ... is
there a line of code that will automatically :confused: set the width
of columns to the widest value ?

Thanks all ...


--
GazMo
------------------------------------------------------------------------
GazMo's Profile:

http://www.excelforum.com/member.php...o&userid=14610
View this thread: http://www.excelforum.com/showthread...hreadid=272396





All times are GMT +1. The time now is 10:02 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com