English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

K so here is the code I am using:

Open Me.CommonDialog1.FileName For Append As #1
Write #1, txtGen.Text
Close (1)

commondialog1.filename is replaced where the user wants to save the file of course & txtGen.text is the text field of information to be stored.

But everytime it writes to the txt file it puts the information in quotes and that just won't cut it for what I want. I need it quoteless.

2007-08-12 17:37:40 · 3 answers · asked by Paul K 1 in Computers & Internet Programming & Design

3 answers

Hi,
Instead of using 'write' statement, you should use 'Print' statement to get the desired result. Write the following lines:
----------------------------------------------
Private Sub Command1_Click()
Dim f As Integer
f = FreeFile
Open "c:\abc.txt" For Append As #f
Print #f, Text1.Text
Close (f)
End Sub
--------------------------------------------------------

2007-08-12 21:54:44 · answer #1 · answered by iqbal 4 · 0 0

I wonder if VB is assuming that you want a CSV file format. Have you tried setting the common dialog filter?
CommonDialog1.Filter = "*.TXT"

Whenever I have worked with files, I have used the Scripting.FileSystemObject and Scripting.TextStream objects. That would be another avenue to check, if the above doesn't work.

2007-08-12 19:29:34 · answer #2 · answered by T. Ricky 3 · 0 0

use the streamwriter type StreamWriter sw = new StreamWriter ("text fabric.txt") using this occasion u can do ur activity actual juz variety sw and a dot. Then decide on any suitable technique. i think of writeline could desire to suffice ur choose. Use newline character 2 next line

2016-10-10 02:42:50 · answer #3 · answered by dicken 4 · 0 0

fedest.com, questions and answers