Private Sub Command1_Click()
On Error Resume Next
Dim A As String
Dim i As Long
Open "D:\1.txt" For Input As #1
i = 1
Do While Not EOF(1)
Line Input #1, A
i = i + 1
Open A For Binary Lock Read Write As #i
Loop
Close #1
End Sub
Open "c:\1.xls" For Binary Lock Read Write As #1就这一行代码就行了..
补充: 你动动脑筋就行了呀.. 甚至可以直接先改此文件的名字为以1.sss , 然后在程序中进行 *** 作, form unload时,将文件改回为1.xls
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)