|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Strings reading and writing (with a file) in VB
Has anyone had any experience reading and writing a file in VB?
When I write a string variable to a file it puts quotes around the line. THen when I read it back, the quotes are there. How do I strip the quotes or make it so that the quotation marks are not there when I write to the file? |
|
#2
|
|||
|
|||
|
Quote:
Don't use write, use print. |
|
#3
|
|||
|
|||
|
Code:
Private Sub SaveData(MyData As String, LFilename As String)
On Error GoTo MyError
Dim FileNumber
' Find Free File # To Open '
FileNumber = FreeFile
Open (App.Path & "\" & LFilename) For Output As #FileNumber
Print #FileNumber, MyData
MyError:
Close #FileNumber
End Sub
|
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Strings reading and writing (with a file) in VB |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|