EDIT: Figured this out, was labeling the .Column with the wrong number!
First off, here is a sample of my codes:
Private Sub PopoutLeadListBox_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
Dim selectedItem As String
selectedItem = Me.PopoutLeadListBox.Column(61)
Set ws = ThisWorkbook.Sheets(Mark1.LEADLISTDROPDOWN.Value)
Mark1.WHYTEXTBOX.Value = Application.XLookup(Val(selectedItem), ws.Range("BI:BI"), ws.Range("CN:CN"))
End Sub
Private Sub PopoutLeadListBox_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
Dim selectedItem As String
selectedItem = Me.PopoutLeadListBox.Column(11)
Set ws = ThisWorkbook.Sheets(SalesForm.BHSDLEADLISTSCOMBOBOXLF.Value)
SalesForm.BHSDTAPNAMELF.Value = Application.XLookup(Val(selectedItem), ws.Range("S:S"), ws.Range("T:T"))
The first code is returning a type mismatch error on this line:
Mark1.WHYTEXTBOX.Value = Application.XLookup(Val(selectedItem), ws.Range("BI:BI"), ws.Range("CN:CN"))
But this isn't a problem for the second. To my knowledge, both of these workbooks are formatted the same, as well. Am I overlooking something?
I'm having a hard time posting a sample workbook of this, so I'm hoping it is something stupid.
Crossposted @ stackoverflow, but don't have permission to post links.
Bookmarks