Hi
I want to be able to use the item that a user selects from a list box in the following code. The listbox is called "viewsection". The value chosen is displayed in a cell on a specified worksheet and is also used as the criteria for an auto filter.
I was using this code with a combo box but as soon as I switched this to a list box it stopped working and I haven't got a clue why.
Any help will be very appreciated.
Thanks
Harv
Private Sub cmdslctadj_Click()
Me.Hide
Sheets("changes").Activate
Sheets("changes").Range("a10:t200").Select
Selection.AutoFilter
Selection.AutoFilter Field:=4, Criteria1:=viewsection
Sheets("changes").Range("d8") = viewsection
Sheets("changes").Range("d8").Select
End Sub
I want to be able to use the item that a user selects from a list box in the following code. The listbox is called "viewsection". The value chosen is displayed in a cell on a specified worksheet and is also used as the criteria for an auto filter.
I was using this code with a combo box but as soon as I switched this to a list box it stopped working and I haven't got a clue why.
Any help will be very appreciated.
Thanks
Harv
Private Sub cmdslctadj_Click()
Me.Hide
Sheets("changes").Activate
Sheets("changes").Range("a10:t200").Select
Selection.AutoFilter
Selection.AutoFilter Field:=4, Criteria1:=viewsection
Sheets("changes").Range("d8") = viewsection
Sheets("changes").Range("d8").Select
End Sub