第1个回答 2009-08-08
Sub Command1_Click()
Dim s As String
Dim s1 As String
Open "d:\1.txt" For Input As #1
If Not EOF(1) Then
Line Input #1, s
While Not EOF(1)
s = s & vbCrLf
Line Input #1, s1
s = s & s1
Wend
End If
Close #1
If text1.Text = s Then
MsgBox "成功"
Else
MsgBox "错误"
End If
End Sub
第2个回答 2009-08-08
验证码?
form_load()
dim s as string
s=filec.openfile("d:\1.txt")
if text1.text=s then
msgbox "成功
else
msgbox "失败
endif
end sub
第3个回答 2009-08-08
2楼不行的吧
Private Sub Command1_Click()
Dim a As String
Open "d:/1.txt" For Input As #1
Input #1, a
Close #1
If Text1.Text Like a Then
MsgBox "成功"
Else
MsgBox "失败"
End If
End Sub
第4个回答 2009-08-08
‘先读入:
dim a as string
a = "d:/1.txt"
if text1.text like a then
msgbox"成功"
else
msgbox“失败”
第5个回答 2009-08-08
lngHandle = FreeFile()
Open "d:\1.txt" For Input As lngHandle
Line Input #lngHandle, strline
close #lnghandle
if text1.text=strline then
msgbox "成功"
else
msgbox "失败"
end if本回答被提问者采纳