List Box - Scroll Wheel on mouse crashes spreadsheet

J

Joe Wildman

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
 
S

Shane Devenshire

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top