下面是我收集电子邮件并将其保存在文本文件中的代码(主要部分)。但我的文本文件没有发生。我的 Sub Email_valid 例程出了点问题有什么线索吗?
在此先感谢,史蒂夫
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
结束子
子邮箱_valid
Writer.Initialize(File.OpenOutput(File.DirDefaultExternal, "Emai1s.txt",True))
Writer.WriteLine(txtemail)
Writer.Close
txtemail.Text=""
Goodemail=False
结束子