Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problems adjusting column width
Hello all,
Just a quick question does anyone know of a way to programmatically adjust the column with to ensure that the text within a cell is entirely visible. I have tried xlSheet.Columns.ShrinkToFit = true; but this doesnt seem to work. I have also tried doing it column by column using a range and a foreach loop but this has the same result. foreach (string str in arrCols) { xlRange1 = xlSheet.get_Range(str + 1, str + 73); xlRange1.Columns.ShrinkToFit = true; } Ive also tried AutoFit() but again not what I need. This just widens all the col widths to a standard area thats too large for what I need. I just need the col width to be wide enough to show all the text and thats it, nothing longer Any suggestions?? Cheers, Sean |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Create a macro which takes a column name and width and sets the column width to what it should be | Excel Programming | |||
adjusting column width using keystrokes | Excel Discussion (Misc queries) | |||
How to make cell width different than the column width it lies in | Excel Discussion (Misc queries) | |||
Need help with adjusting width of VBA-created toolbars | Excel Programming |