AutoFilter

  • Thread starter Thread starter Alan
  • Start date Start date
A

Alan

Hi All,
This is from Help in VB mode

Worksheets("Sheet1").Range("A1").AutoFilter _
field:=1, _
Criteria1:="Otis"
VisibleDropDown:=False

The last line "VisibleDropDown:=False" is rejected and shows in red in the
VB window. When run (as would be expected) it gives a runtime error. Is this
a Microsoft error in Help? Can the visible dropdown be hidden? I have got
round it by using Advanced Filter but I'm curious.
Any feedback would be much appreciated. I have never found an error in Help
in VB mode or spreadsheet mode before.

Windows XP Pro
Office XP Pro

Regards,
Alan.
 
Hi Alan,

That line of code is just missing a comma and a line continuation
character. Here's a corrected version:

Worksheets("Sheet1").Range("A1").AutoFilter _
field:=1, _
Criteria1:="Otis", _
VisibleDropDown:=False

--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/

* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm
 
Thanks Rob,
Cant believe I didn't spot that! Blind faith in Help I suppose,
Regards,
Alan.
 

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