Link to home
Start Free TrialLog in
Avatar of Paurths
Paurths

asked on

Export to Excel: vbCrlf

Hi,
whenever i export data from, for example a textbox with multiline enabled, to MS Excel, it will show me squares in the excel sheet for each vbCrlf there was in the textbox.

Here's an example of the code:

*********
xlSht.Cells(3, 1).Value =  txtRoot(1).Text
*********

Assuming the txtRoot(1) has this data in it:
26578
3246
3444

Then it wil show a square after each number once it is inside a cell in Excel.

How to trap this? (and replace by ALT + ENTER ?)

cheers
Ricky
ASKER CERTIFIED SOLUTION
Avatar of PaulHews
PaulHews
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It chokes on a carriage return, so the trick is to just use a line feed.
Avatar of Paurths
Paurths

ASKER

Thanks Paul,
seeing it i am somewhat ashamed lol,
i can't believe i looked over vbLf...

thanks again,
cheers
Ricky