Below is (the main bit) of my code to collect emails and save them in a text file. But my text file isn't happening. Something wrong in my Sub Email_valid routine Any clues ?
Thanks in advance, Steve
Sub txtemail_EnterPressed
Dim matcher1 As Matcher
Goodemail=False
matcher1 = Regex.Matcher("\w+@\w+\.\w+", txtemail)
Do While Matcher1.Find
Goodemail=True
Loop
If Goodemail=False Then
Msgbox("please input a valid email address", "Sorry")
Else
Msgbox("You will recieve an email shortly","Thank you")
Email_valid
End If
End Sub
Sub Email_valid
Writer.Initialize(File.OpenOutput(File.DirDefaultExternal, "Emai1s.txt",True))
Writer.WriteLine(txtemail)
Writer.Close
txtemail.Text=""
Goodemail=False
End Sub