Afternoon all,
I'm having some trouble with the code to autofilter the results in spreadsheet1 that i've added in to a userform (userform2).
I have columns A - F showing with all rows, which works fine.
I have been able to enable the autofilter, as follows:
With Spreadsheet1
rngTarget.Value = rngSource.Value
.Columns("A:Z").EntireColumn.AutoFit
.Columns("D:D").NumberFormat = "0"
.Columns("A:F").AutoFilter
End With
The autofilter property however appears different to that of a 'normal worksheet'. What i want is for the autofilter to filter the result for the value of userform1.combobox1.value
is this possible?
I've tried the following:
.columns("A:F").AutoFilter, field:=1, criteria1:= userform1.combobox1.value
but i get a weird message when i run the userform, saying that Field 1 and Criteria 1 must be omitted or equal to " " which doesnt work for me...
Any clues??
Much appreciated.
colin
I'm having some trouble with the code to autofilter the results in spreadsheet1 that i've added in to a userform (userform2).
I have columns A - F showing with all rows, which works fine.
I have been able to enable the autofilter, as follows:
With Spreadsheet1
rngTarget.Value = rngSource.Value
.Columns("A:Z").EntireColumn.AutoFit
.Columns("D:D").NumberFormat = "0"
.Columns("A:F").AutoFilter
End With
The autofilter property however appears different to that of a 'normal worksheet'. What i want is for the autofilter to filter the result for the value of userform1.combobox1.value
is this possible?
I've tried the following:
.columns("A:F").AutoFilter, field:=1, criteria1:= userform1.combobox1.value
but i get a weird message when i run the userform, saying that Field 1 and Criteria 1 must be omitted or equal to " " which doesnt work for me...
Any clues??
Much appreciated.
colin