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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unwanted quotationmarks

Status
Not open for further replies.

jokko

Technical User
Apr 3, 2005
4
NL
Hello,
I am trying to export data from a worksheet into a text file for use by a different application. The problem is during export quotation marks are added. For instance: A single cell contains the text: >12345,”text1”,”text2”<. And that is how it should appear in the textfile as well. Instead it appears as : >“12345”,””text1””,””text2””<. Not quite what it should be.

The code I am using:

Dim Waarde As DataObject
Set Waarde = New DataObject
Cells(1, 1).Copy
Waarde.GetFromClipboard

Open ThisWorkbook.Path & "\exporteren.txt" For Output As #1
Write #1, Waarde.GetText
Close #1

Does anybody have a sugestion?
Jokko
 
Jokko,

According to the Help file, Write # should not be used with strings that contain imbedded quotation marks. Have a look at the Print # statement.


Regards,
Mike
 
Some times things can be so simple, thanks Mike.

Jokko
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top