Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
how do i tell if an autofilter is applied so i can reset it when the file is
saved? -- Gary |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If Worksheets("Sheet1").AutoFilterMode Then
isOn = "On" Else isOn = "Off" End If MsgBox "AutoFilterMode is " & isOn -- HTH Bob Phillips (replace xxxx in the email address with gmail if mailing direct) "Gary Keramidas" <GKeramidasATmsn.com wrote in message ... how do i tell if an autofilter is applied so i can reset it when the file is saved? -- Gary |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
thanks, bob, i guess it was pretty simple
-- Gary "Bob Phillips" wrote in message ... If Worksheets("Sheet1").AutoFilterMode Then isOn = "On" Else isOn = "Off" End If MsgBox "AutoFilterMode is " & isOn -- HTH Bob Phillips (replace xxxx in the email address with gmail if mailing direct) "Gary Keramidas" <GKeramidasATmsn.com wrote in message ... how do i tell if an autofilter is applied so i can reset it when the file is saved? -- Gary |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You may want to reset the autofilter when the workbook is opened--not saved. (I
save lots of times and would hate to have my filtering change each time I save. One way is to ignore any error that may occur: Option Explicit Sub auto_open() Dim wks As Worksheet On Error Resume Next For Each wks In ThisWorkbook.Worksheets wks.ShowAllData Next wks On Error GoTo 0 End Sub Another way is to check to see if things need to be reset first: Option Explicit Sub auto_open() Dim wks As Worksheet For Each wks In ThisWorkbook.Worksheets If wks.AutoFilterMode Then If wks.FilterMode Then wks.ShowAllData End If End If Next wks End Sub Gary Keramidas wrote: how do i tell if an autofilter is applied so i can reset it when the file is saved? -- Gary -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
thanks for the idea, i'll keep it mind
-- Gary "Dave Peterson" wrote in message ... You may want to reset the autofilter when the workbook is opened--not saved. (I save lots of times and would hate to have my filtering change each time I save. One way is to ignore any error that may occur: Option Explicit Sub auto_open() Dim wks As Worksheet On Error Resume Next For Each wks In ThisWorkbook.Worksheets wks.ShowAllData Next wks On Error GoTo 0 End Sub Another way is to check to see if things need to be reset first: Option Explicit Sub auto_open() Dim wks As Worksheet For Each wks In ThisWorkbook.Worksheets If wks.AutoFilterMode Then If wks.FilterMode Then wks.ShowAllData End If End If Next wks End Sub Gary Keramidas wrote: how do i tell if an autofilter is applied so i can reset it when the file is saved? -- Gary -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
excel 2007 autofilter change to 2003 autofilter functionality? | Excel Discussion (Misc queries) | |||
2007 excel autofilter back to 2003 autofilter? | Excel Discussion (Misc queries) | |||
2007 excel autofilter change back to 2003 autofilter? | Excel Discussion (Misc queries) | |||
2007 Autofilter worse than 2003 Autofilter | Excel Discussion (Misc queries) | |||
How to Sort within AutoFilter with Protection on (and AutoFilter . | Excel Discussion (Misc queries) |