gollem
asked on
Write to textfile problem
Hi,
this is the problem I have:
I wrote a little program to write some data to a textfile.
Open "g:\transfer\convertedADBs ap.txt" For Output As #1
...
Write #1, strDatum & strKey & strDescription
...
Close #1
This program works great but when I look in the created textfile(with notepad) I see:
"20040731 1 test"
I would like to become 20040731 1 test without the " ". Is this possible? Suggestions?
Thanks
this is the problem I have:
I wrote a little program to write some data to a textfile.
Open "g:\transfer\convertedADBs
...
Write #1, strDatum & strKey & strDescription
...
Close #1
This program works great but when I look in the created textfile(with notepad) I see:
"20040731 1 test"
I would like to become 20040731 1 test without the " ". Is this possible? Suggestions?
Thanks
Write #1, Trim(strDatum) & Trim(strKey) & Trim(strDescription)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Sorry I misunderstood.
Dim strText as String
strText = strDatum & strKey & strDescription
strText = Right(strText, Len(strText) - 1)
strText = Left(strText, Len(strText) - 1)
Write #1, strText
Dim strText as String
strText = strDatum & strKey & strDescription
strText = Right(strText, Len(strText) - 1)
strText = Left(strText, Len(strText) - 1)
Write #1, strText
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi,
thanks guys exactly what I needed. I'll give the points to mladenovicz because he had the fastest solution first, but I'll add 20 points for dhaest for his great comment.
JR2003 I've tested your solution but I still get " " in my textfile.
The print statement was the key I needed.
Thanks again for your time and quick reply.
Gollem
thanks guys exactly what I needed. I'll give the points to mladenovicz because he had the fastest solution first, but I'll add 20 points for dhaest for his great comment.
JR2003 I've tested your solution but I still get " " in my textfile.
The print statement was the key I needed.
Thanks again for your time and quick reply.
Gollem