LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.dotnet.languages.vb,microsoft.public.vb.ole.automation,microsoft.public.vb.ole
external usenet poster
 
Posts: 43
Default Can't create AutoFiltered Excel worksheet using VB.NET

I am trying to create a workbook where one of the worksheets contains
an AutoFiltered table. It looks like it should be simple -- what
I am doing is this:

rng = ws.Range("MyTableRange")
rng.AutoFilter()

Unfortunately I get an exception on the second statement, with the
unhelpful message:

AutoFilter method of Range class failed

The range is rectangular, and contains a legitimate table, with
column headers in the first row and data in most of the cells. If
I create the workbook without calling the AutoFilter statement,
then manually go to the range in question and set AutoFilter from
the Excel Data menu, it works as expected. The worksheet is intended
to be protected, but protection has not yet been set at the point
where I try to set AutoFilter.

I Googled for this, and found two other people complaining of the
same thing, with no answers. I suspect (and hope!) this means that
there is an answer -- otherwise there would be many more queries.

Any help would be gratefully appreciated!
--
John Brock


 
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
how do I create GST worksheet in excel jl New Users to Excel 7 July 2nd 09 07:20 PM
How do I create a worksheet within a worksheet in Excel? Julieee Excel Worksheet Functions 1 December 23rd 05 01:33 AM
create linked autofiltered sheets? wembley Links and Linking in Excel 0 March 26th 05 04:37 AM
Create new excel worksheet Lillian Excel Programming 2 December 4th 04 05:29 AM
Create Excel Worksheet in C# / VB Horst Walter Excel Programming 8 January 5th 04 03:34 PM


All times are GMT +1. The time now is 05:10 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"