Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
having trouble writing string to cell-xl2k
Hello!
I have some code that writes from an array to a cell. The problem is that sometimes the string may have hyphen characters in it which seems to cause excel to assume it's a formula. This causes out of memory errors because the string may be very long. I've tried setting the cell to be text before writing to it but xl still wants to make it a formula. If I remove the hyphens it works fine but I don't want to do that. This is the code I'm using: 'start code rCell.Offset(i, 8).NumberFormat = "@" rCell.Offset(i, 8).Value = udtDr(i).string(j) 'udtDr is user defined type 'end code Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
having trouble writing string to cell-xl2k
Hey that works great -Thanks!
On Thu, 14 Apr 2005 10:06:03 -0700, DragonDom wrote: Try concatenating a single quotation mark( ' ) before the string before writing to the cell. "Terry Carpenter" wrote: Hello! I have some code that writes from an array to a cell. The problem is that sometimes the string may have hyphen characters in it which seems to cause excel to assume it's a formula. This causes out of memory errors because the string may be very long. I've tried setting the cell to be text before writing to it but xl still wants to make it a formula. If I remove the hyphens it works fine but I don't want to do that. This is the code I'm using: 'start code rCell.Offset(i, 8).NumberFormat = "@" rCell.Offset(i, 8).Value = udtDr(i).string(j) 'udtDr is user defined type 'end code Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Trouble writing an excel formula. | Excel Worksheet Functions | |||
XL2K - Conditional Formatting relative to cell selection | Excel Discussion (Misc queries) | |||
On click, copy text into another cell - XL2K | Excel Worksheet Functions | |||
Trouble writing an excel formula... | Excel Worksheet Functions | |||
Create a formula into a String then assign string to a cell | Excel Programming |