![]() |
Data to big for cell
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? |
Data to big for cell
Try manually enlarging the row size
"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? |
Data to big for cell
Try moving to point within the text and 'type'ALT+ENTER to wrap the text
best wishes -- Bernard Liengme MVP Excel http://people.stfx.ca/bliengme "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? |
Data to big for cell
Needs to be done programmatically, not manually, and I do not know how long
the data will be until run time so would not know how large to make row size. Would .Rows.AutoFit look after the row size? "Howard31" wrote: Try manually enlarging the row size "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? |
Data to big for cell
Thanks Bernard but 'moving to point', is not really 'programmatically'.
I have tried inserting Char(10) already (as I said) which equates to ALT + ENTER but still, the last part of text is not visible. "Bernard Liengme" wrote: Try moving to point within the text and 'type'ALT+ENTER to wrap the text best wishes -- Bernard Liengme MVP Excel http://people.stfx.ca/bliengme "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? |
Data to big for cell
Did you autofit the rowheight?
If you autofit the rowheight manually, does it work ok? If no, then if you increase the rowheight manually to what you need, do you see all the characters in the cell? If you do, then just set that rowheight to what you need. Andy wrote: Thanks Bernard but 'moving to point', is not really 'programmatically'. I have tried inserting Char(10) already (as I said) which equates to ALT + ENTER but still, the last part of text is not visible. "Bernard Liengme" wrote: Try moving to point within the text and 'type'ALT+ENTER to wrap the text best wishes -- Bernard Liengme MVP Excel http://people.stfx.ca/bliengme "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? -- Dave Peterson |
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? |
All times are GMT +1. The time now is 03:24 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com