I have made an 12 codes for calling each month that is called when pushing a listbox. if I push januar then it filtres januar i code 1. If I push februar then it filtres februar in another code and so on....
Can I instead make one code that uses combobox.value instead of the month, so I avoid 12 codes - one for each month, and instead uses one code that filtres compared to the combobox.value?
Instead of underneth:
Then like thisPHP Code:
.Range("H2").AutoFilter _
field:=8, _
Criteria1:="Januar", _
VisibleDropDown:=True
I cannot get it to work.PHP Code:
.Range("H2").AutoFilter _
field:=8, _
Criteria1:=combobox.value, _
VisibleDropDown:=True
Bookmarks