inverse of ShrinkToFit

Is there a property for the Range object that does the opposite of
ShrinkToFit? I mean, something like CellExpandsToFit, i.e. the cell size /
row width / column width is adjusted automatically so that the whole text in
it will be visible.

Is there any other ways to accomplish the same effect? E.g. iterate over all
the columns, determine if the texts fit the cells everywhere and if not, set
it to wider.
For that I should be able to determine if the whole text is visible in a
cell.

Thx


0
gusz1 (6)
9/1/2004 12:25:53 PM
excel 39879 articles. 2 followers. Follow

2 Replies
756 Views

Similar Articles

[PageSpeed] 0

Have a look at
autofit

-- 
Don Guillett
SalesAid Software
donaldb@281.com
"Agoston Bejo" <gusz1@freemail.hu> wrote in message
news:OsamK9BkEHA.3148@TK2MSFTNGP10.phx.gbl...
> Is there a property for the Range object that does the opposite of
> ShrinkToFit? I mean, something like CellExpandsToFit, i.e. the cell size /
> row width / column width is adjusted automatically so that the whole text
in
> it will be visible.
>
> Is there any other ways to accomplish the same effect? E.g. iterate over
all
> the columns, determine if the texts fit the cells everywhere and if not,
set
> it to wider.
> For that I should be able to determine if the whole text is visible in a
> cell.
>
> Thx
>
>


0
Don
9/1/2004 2:56:51 PM
You could use a worksheet event that adjusts the column widths.

If any of your cells could change because of a calculation, you could use this:

Option Explicit
Private Sub Worksheet_Calculate()
    Me.UsedRange.Columns.AutoFit
End Sub

Right click on the worksheet tab that should have this behavior.  Select view
code and paste this into the code window.

But you'll notice that you've lost the Edit|Undo (for the most part).



Agoston Bejo wrote:
> 
> Is there a property for the Range object that does the opposite of
> ShrinkToFit? I mean, something like CellExpandsToFit, i.e. the cell size /
> row width / column width is adjusted automatically so that the whole text in
> it will be visible.
> 
> Is there any other ways to accomplish the same effect? E.g. iterate over all
> the columns, determine if the texts fit the cells everywhere and if not, set
> it to wider.
> For that I should be able to determine if the whole text is visible in a
> cell.
> 
> Thx

-- 

Dave Peterson
ec35720@msn.com
0
ec35720 (10082)
9/1/2004 8:33:24 PM
Reply:

Similar Artilces: