ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   run-time error'-2147352571(8002005) (https://www.excelbanter.com/excel-programming/327691-run-time-error-2147352571-8002005-a.html)

cfii

run-time error'-2147352571(8002005)
 
I have a userform with a textbox that the user can enter or edit data in,
it is then sent to a cell on a worksheet. this data is also retrived by
the textbox when opened. I have excel 2003 at home and it works
flawlessly. But when I use it at work on excel 2000 I get a run-time
error "could not set the value property, type mismatch" It works fine
until to much data is entered and then trying to retrive it. I'm talking
about 3 lines of text is ok but any more I get this error. The cell on
the worksheet has this in it after the error "#value". Any help would be
great, I hope this is not to confusing, thanks


keepITcool

run-time error'-2147352571(8002005)
 

you almost diagnosed it yourself...

when you do not explicitly convert the text to a string data type
excel will pass it as a variant. older versions have problems
with passing long text inside a variant.

try Activecell = Cstr(Textbox)

and you should be able to store longer text (32000 characters) also in
xl97.

note:
when a worksheet contains long text, that text is truncated to 255
when the worksheet is copied.



--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


cfii wrote :

I have a userform with a textbox that the user can enter or edit data
in, it is then sent to a cell on a worksheet. this data is also
retrived by the textbox when opened. I have excel 2003 at home and
it works flawlessly. But when I use it at work on excel 2000 I get a
run-time error "could not set the value property, type mismatch" It
works fine until to much data is entered and then trying to retrive
it. I'm talking about 3 lines of text is ok but any more I get this
error. The cell on the worksheet has this in it after the error
"#value". Any help would be great, I hope this is not to confusing,
thanks


cfii

run-time error'-2147352571(8002005)
 
Hey that worked sweet. Thanks alot have a good week



All times are GMT +1. The time now is 05:57 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com