随机文件写入错误,请指教
Private Type username As String * 8
psd As String * 6
End Type
Dim s As user
Private Sub Command1_Click()
Dim i As Integer
Open "c:\user.dat" For Random As #1 Len = Len(s)
For i = 1 To LOF(1) / Len(s)
Get #1, i, s
If s.name = Text1.Text And Text2.Text = Text3.Text Then
s.psd = Text2.Text
Put #1, i, s
Else
MsgBox "请重新输入密码!"
End If
Next
chpsd.Hide
End Sub
一直写不进去,请高手指教!