Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA Can't Insert Long String Into Excel Cell

Status
Not open for further replies.

Mav3000

Technical User
Jun 20, 2005
113
GB
Hi All,

I've a function that opens an Excel Object and worksheet, and then attempts to put a variable's content into a cell.

When the variable (which is a String) has more than 256 characters in it, Excel refuses to insert it into the cell and gives a Error 1004 Application-defined or object-defined error.

The function works fine is a shorter string is passed.

How can I overcome this? One string is 908 characters in length.

Any help appreciated,

Mav3000
 
Hi Hugh,

I didn't see that article, despite Googling for the answer and reading several other pages. Thanks for link that explains the work around really well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top