Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How unselect? Want to run ActiveWindow.VisibleRange but have Chartobject selected | Excel Programming | |||
Unselect all selected areas in all sheets | Excel Discussion (Misc queries) | |||
How can I select one checkbox and have it unselect other ones? | Excel Worksheet Functions | |||
Prompt user to select file with default file selected dialog | Excel Programming | |||
Prompt user to select file with default file selected dialog | Excel Programming |