View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Les Les is offline
external usenet poster
 
Posts: 240
Default Change width of 51 Columns

Hi Lorne,

I do know that method, thanks i just thought there might be an easer way
using an array... ?
--
Les


"Lorne" wrote:

"Les" wrote in message
...
Hi all i am not a programmer but a dabbler and need help with changing the
widths of 51 columns, all variable in width.
What would be the best way to do this, it must be done by code ?
A lot of the columns are the same width, but spaced apart from each
other..

Any help would be greatly appreciated
--
Les


The easiest way to do this is to go to the developer tab, turn on record
macro, change the width of a couple of columns, select some columns then
change their with, stop macro recording and press alt-F11 to look at what
was recorded.

In this case you get the code below from which you should be able to work
out how to do whatever it is you want to do with these articular column
widths:

Sub Macro1()
'
' Macro1 Macro
'
Columns("D:D").ColumnWidth = 12.86
Columns("G:G").ColumnWidth = 14.43
Columns("J:M").Select
Selection.ColumnWidth = 10.43
End Sub