View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default For i = 5 to 1000 for columns?

Here's one way:
Dim Col As Range
For Each Col In Range("A:F").Columns
Col.ColumnWidth = 12
Next

NickHK
P.S. You know Excel version before the 207 Beta only have 256 columns, so
you can't go as high as 1000.

wrote in message
ups.com...
Hello there
I am quite often using functions such as
____________
For i = x to whatever
CODE
Next i
___________

but I would also like to use this kind of structure for columns such as

For ? = A to J
CODE
Next ?

But obviously its not this kind of structure anymore, do you know what
to use?

kind regards,
Daniel