I have this somewhere, but cannot find it AND I cannot seem to see what I am doing wrong here.
I have a select case that assigns values to an array. I then use the array as criteria for an autofilter. The code I have works for assigning the elements to the array, but when the autofilter runs the spreadsheet shows the header row as filtered, but no selections are made in the filter.
I have also run the code as such
The code for assigning the elements of the array
Any ideas?
Thanks,
I have a select case that assigns values to an array. I then use the array as criteria for an autofilter. The code I have works for assigning the elements to the array, but when the autofilter runs the spreadsheet shows the header row as filtered, but no selections are made in the filter.
Code:
'For Each varI In arrLINE
'Debug.Print varI
'Next
wsUTBAFS.AutoFilterMode = False
rngHEAD.AutoFilter Field:=intSGL, Criteria1:=Array(arrLINE)
I have also run the code as such
Code:
'For Each varI In arrLINE
'Debug.Print varI
'Next
wsUTBAFS.AutoFilterMode = False
rngHEAD.AutoFilter Field:=intSGL, Criteria1:=arrLINE
The code for assigning the elements of the array
Code:
arrLINE = Array("510000", "510900", "520000", "520900", "531000", _
"531100", "531200", "531300", "531700", "531800", _
"531900", "532500", "532900", "540000", "540900", _
"590000", "590900", "610000", "619000", "619900", _
"631000", "632000", "633000", "634000", "640000", _
"650000", "660000", "661000", "671000", "672000", _
"673000", "679000", "680000", "685000", "690000", _
"711000", "711100", "711200", "718000", "719000", _
"721000", "721100", "721200", "728000", "729000", _
"729200", "730000", "760000", "850000", "880100", _
"880200", "880300", "880400")
Any ideas?
Thanks,