Hi Westconn1,
Note: See current spreadsheet.
I have been able to accomplish one of my objective - getting rid of spaces(non printable characters)in the "Comments" field with this code:
I also did some tweaking because of the "RunTime error 1004 unable to set the rowheight property of the range clas"Code:xlWksht.Cells(ii + 1, 1).Value = "Comments:" & Chr(10) & "'" & xlApp.Clean(Trim(rsin![Comments]))
However, it ran okay, but the row height is still very high.
Is there any way to make the row height to fit the exact size of the data in the cell?
Below is what I did to get it working so far:
Thanks,Code:With xlWksht.Range(Cells(ii + 1, 1), Cells(ii + 1, 8)) .HorizontalAlignment = xlLeft .VerticalAlignment = xlTop .WrapText = True .Orientation = 0 .IndentLevel = 0 .MergeCells = True MyRowHeight = .RowHeight * Len(xlWksht.Range("A" & CStr(ii + 1)).text) / w If MyRowHeight > 409.5 Then .RowHeight = 409.5 End If End With
GiftX




Reply With Quote