I am working on a project that will take an array of information from a user form, write it onto a new spreadsheet and format it depending on the data. Some of the cells may have very long text strings. The column width is fixed and I want to row height to vary, with wrap around text on.
I tried the following
With Sheets(shtName)
(The code formats the sheet depending on the data)
.rows(V).AutoFit
End with
How ever the row is not auto-sized to the height of the cell with the longest string of Data. It instead cuts it off and sizes the rows to the standard size that they start at when you create a new sheet. The only other thing I can think of is to set different heights based on the size of the string, such as
Select Case len(string)
Case > 25
rows(v).RowHeight = #
Case > 15
rows(v).rowheight = #
.
.
.
End Select
Any ideas?
I tried the following
With Sheets(shtName)
(The code formats the sheet depending on the data)
.rows(V).AutoFit
End with
How ever the row is not auto-sized to the height of the cell with the longest string of Data. It instead cuts it off and sizes the rows to the standard size that they start at when you create a new sheet. The only other thing I can think of is to set different heights based on the size of the string, such as
Select Case len(string)
Case > 25
rows(v).RowHeight = #
Case > 15
rows(v).rowheight = #
.
.
.
End Select
Any ideas?