Column widths in Excel file randomly expanding

A

Anthony

I have developed an MS Excel workbook, and sometimes when the workbook
is opened, the columns on several of the worksheets expand by approx
70%.

It is always the same worksheets it happens to, but it is inconsistent
and does not happen every single time you open the file. You can open
the file a dozen times, and it may only happen once.

In addition to the columns expanding, the controls on the worksheets
(such as buttons, combo boxes, checkboxes, etc) also expand and get
moved.

What is even stranger, even though the properties of these controls
are set to Move and Size with Cells, when I try and manually restore
the columns widths to their correct size, the controls do not resize
back to their original size? Usually, if you expand and contract the
width of columns, either manually or by code, any controls that exist
in those columns will expand and contract back to their original
shape, if their property is set to Move and Size with Cells. This
leads me to believe that this issue is being caused by something other
than any VBA code in my file.

The only code that affects these sheets when the file is opened, is
something similar to this for each sheet:
Sheets(sheetname).Select
Range(range on sheet to zoom to).Select
ActiveWindow.Zoom = True
ActiveWindow.ScrollRow = Application.Selection.Row
Application.GoTo Range("A1"), True

I have reviewed the following articles online, but none help:
http://support.microsoft.com/kb/214123
http://excel.tips.net/Pages/T003175_Random_Width_and_Height_Changes.html
http://www.mrexcel.com/forum/showthread.php?t=20476

Several of these articles suggest writing a macro to restore the
column widths every time the file is open, but because it is also
changing the size and location of the controls, this workaround is not
suitable.

Does anyone know what could be causing this random expanding of column
widths?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top