Hello,
I have two worksheets. One sheet has my list boxes on it and the other sheet has my data in it. I am trying to populate my second list box based on values that I clicked on from the first list box. I am getting a run time error 13 Type mismatch. Sheet 1 is called Input, second sheet is called PracticeNames. The name of my first listbox is lstWave, the name of my second listbox is lstPractices. My goal is to list all the text within a range depending on the input. I am starting with Range 1 that is defined as B2:B6
I have two worksheets. One sheet has my list boxes on it and the other sheet has my data in it. I am trying to populate my second list box based on values that I clicked on from the first list box. I am getting a run time error 13 Type mismatch. Sheet 1 is called Input, second sheet is called PracticeNames. The name of my first listbox is lstWave, the name of my second listbox is lstPractices. My goal is to list all the text within a range depending on the input. I am starting with Range 1 that is defined as B2:B6
Code:
Private Sub lstPractices_Click()
Dim ws As Worksheet
Dim lRow As Long
Set ws = Worksheets("PracticeNames")
lRow = ws.Range("B" & Rows.Count).End(xlUp).Row
If lstWave.Value = 1 Then lstPractices.Value = Worksheets("PracticeNames").Range("B2:B6").Value 'Runtime Error 13 Type mismatch
End Sub