Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 618
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 618
Default 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






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
vb code to hide columns pm tlb Excel Discussion (Misc queries) 4 May 28th 09 09:36 AM
VBA code for sizing/showing pictures Secret Squirrel Excel Discussion (Misc queries) 1 August 28th 08 04:43 AM
Hide columns code jlclyde Excel Discussion (Misc queries) 0 April 25th 08 03:17 PM
VBA code refering to columns by name SkipAtPNS Excel Programming 2 February 27th 04 11:32 PM
CODE TO ADD TWO COLUMNS BASED ON ANOTHER Gauthier Excel Programming 1 October 5th 03 03:20 AM


All times are GMT +1. The time now is 08:15 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"