|
-
Jul 2nd, 2012, 02:57 PM
#1
Thread Starter
New Member
Going from VB 2010 to VB6..why isn't this working?
I am taking a button command from Vb2010 and I have to use it in a VB6 program... What I have is below...Can someone tell me why this doesn't work in VB6? The program takes fields from the user and enters them into a text.INI file...
Private Sub Command1_Click()
Dim path As String = "C:\test.INI" ' PROBLEM
If IO.File.Exists("C:\test.INI") Then
Dim companyFile As IO.TextWriter
companyFile = IO.File.AppendText(path)
companyFile.WriteLine (( Address.Text)) ' writes address to file
companyFile.WriteLine (( Name.Text)) ' writes name to file
companyFile.WriteLine (( Number.Text)) ' writes number to file
companyFile.Flush() 'PROBLEM
companyFile.Close() 'PROBLEM
End If
End Sub
Tags for this Thread
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
|