为何保存为空文件?
为何保存时为空文件?
'1 假如保存为txt文件
Private Sub mnuFileSaveAs_Click()
common1.CancelError = True
common1.Filter = "TxT (*.txt)|*.txt|"
common1.FileName = "Untitled.txt"
common1.FilterIndex = 1
common1.ShowSave
FileName = common1.FileName
If common1.FileName = "" Then Exit Sub
Open common1.FileName For Output As 1
Close
Caption = "Files M3u - " + common1.FileName
End Sub
'2 假如保存为txt文件
Private Sub mnuFileSaveAs_Click()
On Error GoTo errStop
common1.CancelError = True
common1.Filter = "TxT (*.为何txt)|*.txt|"
common1.FileName = "untitled.txt"
common1.ShowSave
Open common1.FileName For Output As #1
For i = 0 To List1.ListCount - 1
a$ = List1.List(i)
Print #1, a$
Next
Close #1
errStop:
Exit Sub
End Sub