Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 414
Default 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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default 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?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 414
Default 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?



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,393
Default 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?


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 414
Default 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?




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
  #7   Report Post  
Posted to microsoft.public.excel.programming
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?


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i find specific data in a cell and its colocated cell data sfself Excel Worksheet Functions 4 March 27th 09 08:23 AM
converting numerical data in one cell to word data in another cell Vishnu Excel Worksheet Functions 2 June 4th 08 03:14 PM
how to find number in a cell , a cell contains character data ornumeric data [email protected] Excel Worksheet Functions 3 February 19th 08 07:29 PM
Find MAX data in sheet (Cell) - Any cell that exceeds X amount of data confuzedagain Excel Discussion (Misc queries) 1 December 7th 05 05:56 PM
data validation to restrict input in cell based on value of cell above that cell NC Excel Programming 2 January 25th 05 07:11 AM


All times are GMT +1. The time now is 09:38 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"