注册 登录
编程论坛 VB6论坛

请各位帮忙改一下错!

事业男儿 发布于 2015-01-30 19:44, 421 次点击
我在读取文本时出现错误,请各位老师帮忙改一下错,谢谢!
只有本站会员才能查看附件,请 登录

Private Sub Command1_Click()
CommonDialog1.DialogTitle = "选择路径"
CommonDialog1.ShowOpen
Label1.Caption = CommonDialog1.FileName
End Sub

Private Sub Command2_Click()
Open "c:\a.txt" For Output As #1
Print #1, Label1.Caption

Close #1

End Sub

Private Sub Command3_Click()
Open "c:\a.txt" For Input As #1
Line Input #1, Label1.Caption
Close #1
End Sub
2 回复
#2
txxb2015-01-30 19:58
Line Input #1, a
Label1.Caption=a
#3
事业男儿2015-01-30 22:00
谢谢!
1