Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a number of sheets on which I need to reset certain
column widths after updating pivot tables on each of them. I have a procedure that loops through the sheets, resetting the column width but on one of the sheets the Selection.ColumnWidth procedure does not work. I am not aware of any differences between the sheets. The same code is on all sheets and none of them is protected. Any ideas why this may be happening. TIA Ron |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Ron
I usually use Selection.EntireColumn.AutoFit Does that solve it? Wolf -----Original Message----- I have a number of sheets on which I need to reset certain column widths after updating pivot tables on each of them. I have a procedure that loops through the sheets, resetting the column width but on one of the sheets the Selection.ColumnWidth procedure does not work. I am not aware of any differences between the sheets. The same code is on all sheets and none of them is protected. Any ideas why this may be happening. TIA Ron . |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You state, that the code is the same for all sheets, but are all sheets the same? My guess is you might have merged two columns so that the column width may not be set. I have not tested to see if this error/problem would result by having two merged columns (Or a row that has two merged columns), but just a thought.
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Columnwidth | Excel Discussion (Misc queries) | |||
How do I reset the columnwidth to sheet-default? | Excel Discussion (Misc queries) | |||
Copy Selection - Transpose Selection - Delete Selection | Excel Discussion (Misc queries) | |||
ColumnWidth not working... | Excel Programming | |||
Columnwidth of a merged cell | Excel Programming |