How to disable column autosizing in Excel 2007

N

Nick Hebb

In Excel 2007, if you enter a number that is too big too fit in a cell,
it will automatically adjust the column width to allow the number to
fit.

I don't want that.

Anyone know how to disable it manually or via VBA?


Thanks,

Nick Hebb
 
K

keri

Nick,

I don't know how to stop this happening. However you could just set the
column widths using code and then I don't think they will change (sorry
if i'm wrong). However all number values will show as ##### if the
width is too small.

Sub changecolumnwidths()
ActiveSheet.Range("a1:g20").Select
Selection.ColumnWidth = 5
End Sub
 
N

Nick Hebb

Thanks keri. In this case the ##### display is inconsequential. I need
fixed column widths for another purpose.

- Nick
 

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