Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there any way to prevent excel from reformatting the cell widths when the data is refreshed from the datasource. I have a worksheet that automatically refreshes when it is opened, but it reformats all of the column headers to fit the longest piece of data for that column.
|
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi needhelp,
You can set the AdjustColumnWidth property of the QueryTable to False, which tells Excel not to update column widths on each refresh of the QueryTable. I think you need to do this only once, so you could execute the following statement from the Immediate Window in the VBE: Sheets("Sheet1").QueryTables(1).AdjustColumnWidth= False Then save your workbook...next time you open, the column widths should not be adjusted. -- Regards, Jake Marx MS MVP - Excel www.longhead.com [please keep replies in the newsgroup - email address unmonitored] needhelp wrote: Is there any way to prevent excel from reformatting the cell widths when the data is refreshed from the datasource. I have a worksheet that automatically refreshes when it is opened, but it reformats all of the column headers to fit the longest piece of data for that column. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Reformatting Cells | Excel Discussion (Misc queries) | |||
Excel 2007 reformatting cells | Excel Discussion (Misc queries) | |||
Reformatting numbers in cells | New Users to Excel | |||
Reformatting text in cells | Excel Worksheet Functions | |||
Macro for reformatting cells | Excel Worksheet Functions |