LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default AutoFilter Automation from VB.NET

I have searched the groups and haven't really found the answer to my
question...

Why can I not get the AutoFilter functionality to work through VB.NET/COM
Interop automation?
Example:

'xlRange = Excel.Range object for some specific range, "2:2" for the
second row
xlRange.AutoFilter(Field:=1)

This code doesn't work. It actually causes the AutoFilter drop down boxes
to appear on the cells in the range, but the drop down buttons do not work.
I do not have multiple worksheets selected nor is the worksheet protected,
the really weird thing is this:
If I open the template file, place some dummy data in the template, turn on
Autofilter, save the template, the turn AutoFilter off and delete the data,
save the template again the above code works just fine. Why can I not use
this code on a new template, one which hasn't gone through the preceding
hoops.

I am using VB.NET, 1.1 Framework and Office 2003.

Thanks in advance, anything would be appreciated

James Glover


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
excel 2007 autofilter change to 2003 autofilter functionality? jonnybrovo815 Excel Discussion (Misc queries) 1 April 19th 10 10:05 PM
2007 excel autofilter back to 2003 autofilter? jonnybrovo815 Excel Discussion (Misc queries) 3 April 19th 10 08:11 PM
2007 excel autofilter change back to 2003 autofilter? jonnybrovo815 Excel Discussion (Misc queries) 1 April 19th 10 05:53 PM
2007 Autofilter worse than 2003 Autofilter jsky Excel Discussion (Misc queries) 9 October 31st 07 12:14 AM
How to Sort within AutoFilter with Protection on (and AutoFilter . giblon Excel Discussion (Misc queries) 1 February 16th 06 12:23 PM


All times are GMT +1. The time now is 04:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"