作者:七月de七月小 | 来源:互联网 | 2023-05-18 09:07
http:club.excelhome.netattachment.php?aid547411&ka8733eac0c32f9966665cb2a3e8ae328&t124
http://club.excelhome.net/attachment.php?aid=547411&k=a8733eac0c32f9966665cb2a3e8ae328&t=1247455398
上面那个是文件的地址。
在文件中,双击SHEET3的2、3列可以弹出一个小的窗口,里面有一段小程序。
点击确定以后就会弹出如题错误。
类似的程序我在VB下运行没问题。
请教高手帮忙解决下,谢谢!~
2 个解决方案
这个是因为超过了listbox的边界
Private Sub CommandButton1_Click()
Dim j As Integer
Dim result As String
If ListBox1.ListCount > 1 Then
For j = 0 To
ListBox1.ListCount - 1 If ListBox1.Selected(j) = True Then
If j = ListBox1.ListCount - 1 Then
result = result & ListBox1.List(j)
Else
result = result & ListBox1.List(j) & "¡¢"
End If
End If
Next
End If
If result <> "" Then
MsgBox result
End If
End Sub