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

omit parenthesis/quote marks when writing to text file 1

Status
Not open for further replies.

scottian

Programmer
Jul 3, 2003
955
GB
I have some code which imports a text file and loops through each record, querying a database as it goes, retreiving another value from the screen and then writes both values to another text file, however, when it does this it wraps the info with quote marks ( "myInputString,myOutputString" ). how do I stop this happening?

example :-
Input - 340080050

Output - "340080050,Name"

"My God! It's full of stars...
 


Hi,

What method are you using to write to the output file?

Please post your code.

Skip,

[glasses] [red][/red]
[tongue]
 
Sorry

This is the code im using :-



Sub Main()
close
'-----------------------
Dim a as string

Open "C:\Book1.txt" for input as #1
Open "C:\Book1Output.txt" for append as #2
Do while EOF(1) <> True
Input #1, TestField
'-----------------------
Sess0.Screen.Sendkeys("" & TestField & "<Enter>")
a = Trim(Screen.GetString(4,38,4))
FileData =TestField & "," & a
Write #2,FileData

Loop
close
msgbox "Done"
End Sub

"My God! It's full of stars...
 
Excellent....thanks

"My God! It's full of stars...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top