DrCheese1023
New Member
- Joined
- Jun 28, 2021
- Messages
- 10
- Office Version
- 2019
- Platform
- Windows
Hey all! First off, here is my code:
This is working great on a few of the items in my list box. However, most of them give me a type mismatch error, and the fact that it's not working on some items but is on others with no discernible difference between the items is confusing.
Am I missing something simple?
VBA Code:
Private Sub PopoutLeadListBox_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
Dim selectedItem As String
selectedItem = Me.PopoutLeadListBox.Column(11)
SalesForm.BHSDTAPNAMELF.Value = Application.XLookup(Val(selectedItem), Worksheets("MASTER TAPS").Range("S:S"), Worksheets("MASTER TAPS").Range("T:T"))
SalesForm.BHSDCOMPANYNAMELF.Value = Application.XLookup(Val(selectedItem), Worksheets("MASTER TAPS").Range("S:S"), Worksheets("MASTER TAPS").Range("U:U"))
End Sub
This is working great on a few of the items in my list box. However, most of them give me a type mismatch error, and the fact that it's not working on some items but is on others with no discernible difference between the items is confusing.
Am I missing something simple?