Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
ColumnWidth not working...
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
ColumnWidth not working...
FIXED:
rc = 15 ColPlace = 1 For counter = 0 To rc - 1 wb.Sheets(1).Columns(ColPlace).ColumnWidth = 10 ColPlace = ColPlace + 1 Next Thanks tho, B -----Original Message----- Here's my code: rc = 15 ColPlace = 1 For counter = 0 To rc - 1 wb.Worksheets("Sheet1").Columns(ColPlace).ColumnW idth = 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. . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Columnwidth | Excel Discussion (Misc queries) | |||
Calculate working days but change working week | Excel Discussion (Misc queries) | |||
How do I reset the columnwidth to sheet-default? | Excel Discussion (Misc queries) | |||
Columnwidth of a merged cell | Excel Programming | |||
Adding sales from a non working day to the previous working day | Excel Programming |