|
-
February 21st, 2000, 11:19 AM
#1
Writing text files
I am having a problem writing to a text file without having quotes round my strings. The help files talk about print# statement but it doesn't seem to work. What am I doing wrong.
-
February 21st, 2000, 11:34 AM
#2
Re: Writing text files
try this
Open "c:\yourfile.txt" for Output as #1
print #1, "this is a string"
print #1, """this is a string""" ' will have quotes
Close #1
-
February 21st, 2000, 03:41 PM
#3
Re: Writing text files
If you want quotes around your strings, you can use write.
Dim sString as string
sString = "This is my text"
Write #1, sString
would put "This is my text" (in quotes) in your file. Using the Write statement put's quotes around strings, #'s around dates, and signifies boolean data by #TRUE# or #FALSE#. The Write statement also comma-delimits your data.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|