ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   List Box - Scroll Wheel on mouse crashes spreadsheet (https://www.excelbanter.com/excel-worksheet-functions/219701-list-box-scroll-wheel-mouse-crashes-spreadsheet.html)

Joe Wildman[_2_]

List Box - Scroll Wheel on mouse crashes spreadsheet
 
Here is the code,

Private Sub ListBox1_Change()

Dim outString As String, i As Long

outString = vbNullString
With ListBox1
For i = 0 To .ListCount - 1
If .Selected(i) Then outString = outString & .List(i) & ", "
Next i
End With
Range("I2").Value = outString

End Sub

Shane Devenshire[_2_]

List Box - Scroll Wheel on mouse crashes spreadsheet
 
I tested your code with a Control Toolbox listbox and had no problems. The
listbox being in the spreadsheet. What else is going on here? And what does
the Scroll Wheel have to do with this issue?

What version of Excel are you using?

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"Joe Wildman" wrote:

Here is the code,

Private Sub ListBox1_Change()

Dim outString As String, i As Long

outString = vbNullString
With ListBox1
For i = 0 To .ListCount - 1
If .Selected(i) Then outString = outString & .List(i) & ", "
Next i
End With
Range("I2").Value = outString

End Sub


Joe Wildman[_2_]

List Box - Scroll Wheel on mouse crashes spreadsheet
 
Located the solution, but my companys brower settings will not enable the
brower settings needed to download the patch, can someone help me find a
download link to this patch? http://support.microsoft.com/kb/950103

"Shane Devenshire" wrote:

I tested your code with a Control Toolbox listbox and had no problems. The
listbox being in the spreadsheet. What else is going on here? And what does
the Scroll Wheel have to do with this issue?

What version of Excel are you using?

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"Joe Wildman" wrote:

Here is the code,

Private Sub ListBox1_Change()

Dim outString As String, i As Long

outString = vbNullString
With ListBox1
For i = 0 To .ListCount - 1
If .Selected(i) Then outString = outString & .List(i) & ", "
Next i
End With
Range("I2").Value = outString

End Sub



All times are GMT +1. The time now is 01:51 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com