Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default AutoFilter selected row not 'retained' across user unselect/select

Sorry if this is the wrong place for this, first post ever!

I'm building a tool to create a set of workbooks.
Our 'header' consists of 6 rows, mostly blank,with the column names on row
4, and the column names duplicated on row 6. Data starts in row 7.

When testing, I was able to set and file the AutoFilter programmatically on
Row 6. When I opened the books, Row 6 had the dropdowns.

When (me the user) clicked off the autofilter and clicked it back on, it set
the autofilter row to row 4?

Is there something programmatically I need to set to retain row 6 as the
AutoFilter row?

Thanks,
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default AutoFilter selected row not 'retained' across user unselect/select

Are you selecting the exact range you want filtered or letting excel guess.

I bet you're not selecting the exact range, then applying the filter.

YoDave wrote:

Sorry if this is the wrong place for this, first post ever!

I'm building a tool to create a set of workbooks.
Our 'header' consists of 6 rows, mostly blank,with the column names on row
4, and the column names duplicated on row 6. Data starts in row 7.

When testing, I was able to set and file the AutoFilter programmatically on
Row 6. When I opened the books, Row 6 had the dropdowns.

When (me the user) clicked off the autofilter and clicked it back on, it set
the autofilter row to row 4?

Is there something programmatically I need to set to retain row 6 as the
AutoFilter row?

Thanks,


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default AutoFilter selected row not 'retained' across user unselect/select

ty for response.

Range is set. I'm using

wb.open()
....
Excel.Range afRange = get_Range("A6", "E6");
afRange.AutoFilter(1, Type.Missing,
Excel.XlAutoFilterOperator.xlAnd, Type.Missing, true);
....
wb.SaveAs(newname);

So that I can reuse the template and set specifics for different workbooks.
This is working ok.
In my set of saved workbooks, when I open one, Row 6 is indeed set as the
autofilter row on each sheet. However, when I click autofilter off, then
click it back on, it loses track of row 6, and is setting row 4!

I guess my question is, ms knew what row autofilter was set on when the
workbook was opened by the user, but when the user starts playing around, the
row or range that was set is lost?

"Dave Peterson" wrote:

Are you selecting the exact range you want filtered or letting excel guess.

I bet you're not selecting the exact range, then applying the filter.

YoDave wrote:

Sorry if this is the wrong place for this, first post ever!

I'm building a tool to create a set of workbooks.
Our 'header' consists of 6 rows, mostly blank,with the column names on row
4, and the column names duplicated on row 6. Data starts in row 7.

When testing, I was able to set and file the AutoFilter programmatically on
Row 6. When I opened the books, Row 6 had the dropdowns.

When (me the user) clicked off the autofilter and clicked it back on, it set
the autofilter row to row 4?

Is there something programmatically I need to set to retain row 6 as the
AutoFilter row?

Thanks,


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default AutoFilter selected row not 'retained' across user unselect/select

I'm not sure what click autofilter on and off mean. But if I'm doing things
manually, I'd select the range first.

If I'm doing it in code (VBA), I'd remove the existing filter arrows and reapply
them to the range I wanted.

With Worksheets("SomeSheetNameHere")
.autofiltermode = false
.range("a6:E6").autofilter
End with

I don't speak that stuff you're speaking <vbg.


YoDave wrote:

ty for response.

Range is set. I'm using

wb.open()
...
Excel.Range afRange = get_Range("A6", "E6");
afRange.AutoFilter(1, Type.Missing,
Excel.XlAutoFilterOperator.xlAnd, Type.Missing, true);
...
wb.SaveAs(newname);

So that I can reuse the template and set specifics for different workbooks.
This is working ok.
In my set of saved workbooks, when I open one, Row 6 is indeed set as the
autofilter row on each sheet. However, when I click autofilter off, then
click it back on, it loses track of row 6, and is setting row 4!

I guess my question is, ms knew what row autofilter was set on when the
workbook was opened by the user, but when the user starts playing around, the
row or range that was set is lost?

"Dave Peterson" wrote:

Are you selecting the exact range you want filtered or letting excel guess.

I bet you're not selecting the exact range, then applying the filter.

YoDave wrote:

Sorry if this is the wrong place for this, first post ever!

I'm building a tool to create a set of workbooks.
Our 'header' consists of 6 rows, mostly blank,with the column names on row
4, and the column names duplicated on row 6. Data starts in row 7.

When testing, I was able to set and file the AutoFilter programmatically on
Row 6. When I opened the books, Row 6 had the dropdowns.

When (me the user) clicked off the autofilter and clicked it back on, it set
the autofilter row to row 4?

Is there something programmatically I need to set to retain row 6 as the
AutoFilter row?

Thanks,


--

Dave Peterson


--

Dave Peterson
Reply
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 unselect? Want to run ActiveWindow.VisibleRange but have Chartobject selected tskogstrom Excel Programming 3 September 30th 06 12:56 AM
Unselect all selected areas in all sheets SiriS Excel Discussion (Misc queries) 2 January 20th 06 08:36 AM
How can I select one checkbox and have it unselect other ones? Jake Excel Worksheet Functions 1 October 10th 05 03:39 AM
Prompt user to select file with default file selected dialog Bruce Cooley Excel Programming 0 September 15th 03 06:43 AM
Prompt user to select file with default file selected dialog Bob Phillips[_5_] Excel Programming 0 September 14th 03 09:19 PM


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