PDA

View Full Version : vba code.... change column width on selection of pivot table



cranswickp
08-06-2007, 08:55 AM
Hi,I have a pivot table, and on selection i want it to format the width of the columns. The problem i'm having is that i can only set the widths to all the same. Im wanting column A & B wider than the rest. The code i have used so far is >>>>> Range("C:Z").Select Selection.ColumnWidth = 14 Range("A:B").Select Selection.ColumnWidth = 31but this some how sets all the coloumns to 31????????Any help will be helpful as i am new to vba, thanksPaul

cranswickp
08-06-2007, 09:08 AM
all sorted, i had some merged cells in there which were cauing a few problems.