发布网友 发布时间:2022-04-22 08:49
共3个回答
热心网友 时间:2024-05-18 06:33
1、用List的ListCount属性即可判断
List1.ListCount=0 为空白
List1.ListCount>0 则不为空
2、使用循环就可以解决
List2.Clear
for i = 0 to List1.ListCount-1
List2.AddItem List1.List(i)
next i
这样就将List1的内容复制到List2了
热心网友 时间:2024-05-18 06:33
if(list1.value.trim() <> "")
{
list2.items.add(list1.item[x])
}
热心网友 时间:2024-05-18 06:33
1、用List的ListCount属性即可判断
List1.ListCount=0 为空白
List1.ListCount>0 则不为空
2、使用循环就可以解决
List2.Clear
for i = 0 to List1.ListCount-1
List2.AddItem List1.List(i)
next i
这样就将List1的内容复制到List2了
热心网友 时间:2024-05-18 06:34
'1、
Private Sub Command1_Click()
MsgBox IIf(List1.ListCount > 0, "不", "") & "是空白"
'2、
Private Sub Command2_Click()
Dim i As Long
List2.Clear
For i = 0 To List1.ListCount - 1
List2.AddItem List1.List(i)
Next
End Sub
'3
Private Sub Command3_Click()
Dim i As Long
For i = 0 To List1.ListCount - 1
List2.AddItem List1.List(i)
Next
End Sub
'4
Private Sub List1_Click()
List1.RemoveItem List1.ListIndex
End Sub
热心网友 时间:2024-05-18 06:34
if(list1.value.trim() <> "")
{
list2.items.add(list1.item[x])
}
热心网友 时间:2024-05-18 06:34
'1、
Private Sub Command1_Click()
MsgBox IIf(List1.ListCount > 0, "不", "") & "是空白"
'2、
Private Sub Command2_Click()
Dim i As Long
List2.Clear
For i = 0 To List1.ListCount - 1
List2.AddItem List1.List(i)
Next
End Sub
'3
Private Sub Command3_Click()
Dim i As Long
For i = 0 To List1.ListCount - 1
List2.AddItem List1.List(i)
Next
End Sub
'4
Private Sub List1_Click()
List1.RemoveItem List1.ListIndex
End Sub