VB输入超出文件尾

来源:百度知道 编辑:UC知道 时间:2024/05/24 01:36:20
超郁闷
Private Sub Form_Load()
Open App.Path + "\9527.dat" For Input As #1
Input #1, mima
Close #1
End Sub
那里错了
怎么 弄宽度

Private Sub Form_Load()
Open App.Path + "\9527.dat" For Input As #1
do while not eof(1)
line Input #1, s
mima = mima & s
loop
Close #1
End Sub

宽度不够

你要写入和读什么样的数据我这儿有两个函数是否可以帮你你自己改一下就行了别整得这么累
'文件写入
Sub Qwrite(indata As String)
Open FILEAD For Output As #3
Print #3, indata
Close #3
End Sub
'文件读取
Function Qread() As String
Dim myhand As String
Open FILEAD For Input As #4
Input #4, myhand
Close #4
Qread = myhand
End Function
不过这个函数有点儿不好就是只写入和读出一条数据