Private Sub lbFunds_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
For i = 0 To lbHoldings.ListCount - 1
If lbFunds = lbHoldings.List(i) Then
Beep
Exit Sub
End If
Next i
'this is where it is breaking
Set SourceRange = Range(frmDimPres.lbFunds.List)
strValue = SourceRange.Offset(lbFunds.ListIndex, 0).Resize(1, 1).Value
refValue = SourceRange.Offset(lbFunds.ListIndex, 1).Resize(1, 1).Value
'pass the value from the previous listbox into the listbox lbHoldings
lbHoldings.AddItem strValue & refValue
End Sub
|