VBA auto filter question

  • Thread starter Thread starter Andre Croteau
  • Start date Start date
A

Andre Croteau

Hi,

I have data in cells A3:C200, with the auto filter ON

I am trying to automate some procedures, and would like to put a value in
cell say "A1" which would represent the auto filter query I am looking for
column "C"

so far I have tried

Dim WSCode As String
WSCode = Worksheets("Sheet1").Cells(1, 1).Value
Selection.AutoFilter Field:=3, Criteria1:="WSCode"


but it doesn't work....

Can someone please give me a hand?

Thanks

André
 
Andre

Off to test but it should work if you take the quotes from around the
variable

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
(e-mail address removed)
 
Andre

Tested...yes fine

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
(e-mail address removed)
 
Thank you...works well now



Nick Hodge said:
Andre

Tested...yes fine

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top