View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Howard31[_3_] Howard31[_3_] is offline
external usenet poster
 
Posts: 28
Default Data to big for cell

To autofit the row programmatically use Worksheets("Sheet1").Rows(1).AutoFit

"Andy" wrote in message
...
Hi - I am programmatically setting the value of a particular cell in a
worksheet to a long string (some 2000 characters). I have set the width of
the column containing the cell to a sensible width (.ColumnWidth = 40) and
I
have set the attribute .WrapText = True

I would expect to see all the data but some is not visible. The only way
to
see the data is to later drag the column much wider etc. Surely, the wrap
attribute should suffice?

I have also tried inserting Char(10) at intervals within the string to act
like Ctrl +Alt (carriage throw) but no luck.

Any thoughts?