ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   sizing columns in code (https://www.excelbanter.com/excel-programming/305456-sizing-columns-code.html)

JulieD

sizing columns in code
 
Hi All

i'm having a really hard time sizing columns in code ... i've tried writing
the code myself /i've tried recording it and nothing seems to work .. very
simply i want column A to be 10, B to be 40, C to be 20, D & E & F & G & H
to be 15 & I to be 40 ... how do i do it???

the text in these columns also needs to word wrap.

Using Excel 2000 (but i can't get it to work on 2002 or 2003 either).

Cheers
julieD



Chip Pearson

sizing columns in code
 
Julie,

Try something like

Columns(1).ColumnWidth = 10
Columns(2).ColumnWidth = 40
' etc


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"JulieD" wrote in message
...
Hi All

i'm having a really hard time sizing columns in code ... i've

tried writing
the code myself /i've tried recording it and nothing seems to

work .. very
simply i want column A to be 10, B to be 40, C to be 20, D & E

& F & G & H
to be 15 & I to be 40 ... how do i do it???

the text in these columns also needs to word wrap.

Using Excel 2000 (but i can't get it to work on 2002 or 2003

either).

Cheers
julieD





JulieD

sizing columns in code
 
Hi Chip

thanks, worked perfectly

Cheers
julieD

"Chip Pearson" wrote in message
...
Julie,

Try something like

Columns(1).ColumnWidth = 10
Columns(2).ColumnWidth = 40
' etc


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"JulieD" wrote in message
...
Hi All

i'm having a really hard time sizing columns in code ... i've

tried writing
the code myself /i've tried recording it and nothing seems to

work .. very
simply i want column A to be 10, B to be 40, C to be 20, D & E

& F & G & H
to be 15 & I to be 40 ... how do i do it???

the text in these columns also needs to word wrap.

Using Excel 2000 (but i can't get it to work on 2002 or 2003

either).

Cheers
julieD








All times are GMT +1. The time now is 10:33 AM.

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