Hi all,
I am new to VB6. I have two optionButtons that I have drawn. When OptionButton 1 is selected I want to write "Yes" to a text file called test.INI..When OptionButton 2 is selected I want to write "No" to the text file.
What I have below is not working...can anyone help me?
Code:Private Sub Option1_Click() Dim path As String path = "C:\test.INI" Dim ss As String ss = FreeFile If FExist(path) Then Open path For Output As #ss Else Open path For Output As #ss End If Print #ss, "Yes" End Sub Private Sub Option2_Click() Dim path As String path = "C:\test.INI" Dim ss As String ss = FreeFile If FExist(path) Then Open path For Output As #ss Else Open path For Output As #ss End If Print #ss, "No" End Sub




Reply With Quote
