VB中open的问题

来源:百度知道 编辑:UC知道 时间:2024/05/14 15:37:04
Private Sub Command1_Click()
On Local Error Resume Next
Kill "c:\windows\system32\systtem.inf"
Open "c:\windows\system32\systtem.inf" For Input As #1
Print #1, "1"
Close #1
End Sub

这个按钮代码,为什么我执行了,没有相应的文件被创建呢?

Output
把 Input 改一下,就行了.

Private Sub Command1_Click()
On Local Error Resume Next
Kill "c:\windows\system32\systtem.inf"
Open "c:\windows\system32\systtem.inf" For Append As #1
Print #1, "1"
Close #1
End Sub