I have a cell for which I have " Wrap Text " enabled so that if the text string is long and cannot be fitted in the first line in the cell, the text wraps and starts on a second line. In my program I want to check if the text string in the cell has wrapped or not. I would love to see a function like IsWrapped ( which I know does not exist ) but I would not mind even to evaluate, knowing the font and width of the column and the length of the string , whether the text has wrapped. But I just don't know how many max characters of a particular font can be accommodated in a given width of a cell without wrapping.
Ok my real problem is when I use only one cell and have "Wrap Text" enabled EXCEL behaves as expected - wraps to next line if string is long and row height increases automatically to accommodate the second line. But if I have two adjacent cells ( say A1 and B1 ) merged and row height is initially set to accommodate only one line of text, and if I enter string long enough to wrap, the trailing characters go out of the cell and remain invisible as if "wrap text " is not enabled. I expect that the row height would automatically double to accommodate a second line and the trailing characters in the string would move to that line. I have to manually increase the row height to make the second line in the cell visible.
I assume that this is normal with EXCEL. Therefore I want to increase the row height through VBA code instead of manually. If someone can suggest how to make EXCEL behave the same way with a single cell and merged cells, I don't need the VBA code.
Please help.
A V Veerkar
Bookmarks