Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Selection.ColumnWidth

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Selection.ColumnWidth

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   Report Post  
Posted to microsoft.public.excel.programming
COM COM is offline
external usenet poster
 
Posts: 40
Default Selection.ColumnWidth

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Columnwidth Jean-Paul Excel Discussion (Misc queries) 1 November 24th 09 02:21 PM
How do I reset the columnwidth to sheet-default? schilleman Excel Discussion (Misc queries) 1 October 31st 07 09:06 AM
Copy Selection - Transpose Selection - Delete Selection Uninvisible Excel Discussion (Misc queries) 2 October 23rd 07 04:18 PM
ColumnWidth not working... BEE Excel Programming 2 December 19th 03 06:29 PM
Columnwidth of a merged cell Jos Vens Excel Programming 2 November 9th 03 11:19 AM


All times are GMT +1. The time now is 05:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"