请教:为什么窗口装载时,Combo1的下拉框中只显示一列?(全部都在一列中显示)
另外,当我把 Append 换成 output 时,保存后abc.txt文件却是空白的,这是怎么回事?
我是个菜鸟,望各位多多指教!
Dim a As Integer
Private Sub CndSave_Click()
For a = 0 To Combo1.ListCount
Open App.Path & "\abc.txt" For Append As #1
Print #1, Combo1.List(a) '把Combo1下拉框的内容保存到abc.txt的文本文件中
Close #1
Next
End Sub
-------------------------------------------------------
Private Sub Cndadd_Click()
For a = 1 To 10
Combo1.AddItem a
Next
End Sub
--------------------------------------------------------
Private Sub Form_Load()
On Error GoTo 0
Open App.Path & "\abc.txt" For Binary As #1
Combo1.AddItem Input(LOF(1), 1) '装载窗口自动加载abc.txt的内容到Combo1下拉框。(但全部都显示在一列中)
Close 1
End Sub