View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default ColumnWidth not working...

Sub Tester1()
Set wb = ActiveWorkbook
rc = 15
ColPlace = 1
For counter = 0 To rc - 1
wb.Worksheets("Sheet1").Columns(ColPlace).ColumnWi dth = 10
ColPlace = ColPlace + 1
Next

End Sub


Worked fine for me.

wb.Worksheets("Sheet1").Cells(1,ColPlace).Entireco lumn.ColumnWidth = 10

would also work.

--
Regards,
Tom Ogilvy


"BEE" wrote in message
...
Here's my code:
rc = 15
ColPlace = 1
For counter = 0 To rc - 1
wb.Worksheets("Sheet1").Columns(ColPlace).ColumnWi dth = 10
ColPlace = ColPlace + 1
Next

I did this cause I couldn't get a range option to work in
this scenario either. How? What am I missing?

Thanks in advance,
B.