aaaa和bbbb都是字符串,差升需要加上双引号("")
所以改成:
List1.AddItem "aaaa"
List1.AddItem "bbbb"
或亩庆桐者加入代码:迅坦
Dim aaaa As String,bbbb As String
aaaa = "aaaa"
bbbb = "bbbb"
望采纳~~
三种方法:1.用消锋前嫌悄面的那种API加长滚动条;
2.用API(也是拿者晌SENDMESSAGE)读出该LIST的内容,用TOOLTIP显示出来(在MOUSEMOVE里用)
3.点选一条记录,再用TOOLTIP显示该记录内容。
Private Sub Command1_Click()Dim a As Integer, i As Integer,
For i = 0 To List2.ListCount - 1
If List2.Selected(i) Then
For j = 0 To List1.ListCount - 1
If List2.List(i) = List1.List(j) Then
MsgBox List2.List(i) &"已经选过了"
Exit For
End If
Next j
If j = List1.ListCount Then List1.AddItem List2.List(i)
a = a + 1
End If
Next i
If a = 0 Then MsgBox "请在答袭右边的文本框侍举敏中选择项老枝目"
End Sub
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)