vb里面怎么把listbox控件里面的文件导出来存到电脑上其它地方,存成TXT文件?

2024-12-22 20:27:56
推荐回答(2个)
回答1:

list中内容的添加
Private Sub Command1_Click()
List2.Clear
Dim i As Integer
For i = 0 To List1.ListCount - 1
List2.AddItem List1.List(i), i
Next i
End Sub

'combo与list差不多
Private Sub Combo1_DropDown() 'combo下拉事件
Combo2.Clear
Dim i As Integer
For i = 0 To Combo1.ListCount - 1
Combo2.AddItem Combo1.List(i), i
Next i
End Sub

回答2:

dim a as interger
a=List1.ListCount