Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello -
I want to determine whether a string will fit into a column or now (i.e. whether it needs to be wrapped or not). I looked at the WrapText property but that is only set when the cell is actually wrapped. Is there a way to determine a "wrap necessary" or "will be wrapped" status? I could probably count the number of characters and make a guestimate on the maximum number of characters that will fit into a specified column witdh ... just not the best solution ... Any ideas? Thanks, Joe |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you set cell formatting to wrap text, the wrapping will be done
automatically. Does wrapped text affect something else you need to do? The following works in Excel 2003. When run, it uses the .RowHeight property to display a dialog box with the height of cell A1. When I set formatting in A1 to Wrap Text, the height changed when the text was long enough to cause wrapping. Dim x As Integer Sub doathing() x = Cells(1, 1).RowHeight MsgBox (x) End Sub |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello -
That worked! I check the RowHeight before I set the value (with WrapText = True) and then I check the RowHeight after I set the value and check whether it is larger. Thanks! Joe |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Glad to help. Thanks for the feedback.
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Not all wrapped text in an Excell cell is printed. Why not? | Excel Discussion (Misc queries) | |||
wrapped text cell | Excel Discussion (Misc queries) | |||
Cell data not visible (I have wrapped text & resized) | Excel Worksheet Functions | |||
In Excel formatted wrapped text displays as xxx in cell | Excel Discussion (Misc queries) | |||
Unwanted blank line in cell with wrapped text | Excel Discussion (Misc queries) |