[求助]文件写操作
Private Sub cmdWriteDoc_Click()
Dim fso As New FileSystemObject
Dim MyFile As TextStream
Dim objFolder As Scripting.Folder
Set objFolder = fso.GetFolder("" & App.Path & "\doc ")
Set MyFile = fso.CreateTextFile("" & App.Path & "\doc\1.txt", True)
Open "" & App.Path & "\doc\1.txt" For Output As #1 '到这里就错了
Print #1, Now
Print #1, Me.cmbP_ID
Print #1, Me.lstRight.Text
Print #1, Me.txtP_BeginTime
Print #1, Me.txtP_EndTime
Print #1, Me.txtP_Task
Close #1
MsgBox "写入磁盘成功!", vbOKOnly + vbInformation, "操作结果"
End Sub
谁能帮我解释一下咋回事?多谢!