程序代码
Private Sub Command1_Click() '以(覆盖)模式导出text
Open App.Path & "\123.txt" For Output As #1
Print #1, Text1.Text
Close #1
End Sub
Private Sub Command2_Click()'以(追加)模式导出text
Open App.Path & "\123.txt" For Append As #1
Print #1, Text1.Text
Close #1
End Sub
Private Sub Command3_Click()'导出list
Dim a As Integer
Dim b As String
For a = 0 To List1.ListCount - 1
b = b & List1.List(a) & vbCrLf
Next a
'-------------------------------------------整理文本
Open App.Path & "\123.txt" For Output As #1
Print #1, b
Close #1
'-------------------------------------------正式导出
End Sub