Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default IF AutoFilter is on, turn it off

Hi all....

I know I can toggle the Autofilter on and off with the line
"Selection.Autofilter", but when I send a user to a Sheet from my Main Menu,
I do not know if Autofilter is on there, or not.......I would like to turn it
off if it has been left on........help please.....

Vaya con Dios,
Chuck, CABGx3


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 292
Default IF AutoFilter is on, turn it off

Hi Chuck

Sub test()
MsgBox ActiveSheet.AutoFilterMode
End Sub

HTH. Best wishes Harald


"CLR" skrev i melding
...
Hi all....

I know I can toggle the Autofilter on and off with the line
"Selection.Autofilter", but when I send a user to a Sheet from my Main

Menu,
I do not know if Autofilter is on there, or not.......I would like to turn

it
off if it has been left on........help please.....

Vaya con Dios,
Chuck, CABGx3




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 441
Default IF AutoFilter is on, turn it off

CLR, add the following line to your code:

If ActiveSheet.AutoFilterMode Then ActiveSheet.AutoFilterMode = False

HTH

"CLR" wrote:

Hi all....

I know I can toggle the Autofilter on and off with the line
"Selection.Autofilter", but when I send a user to a Sheet from my Main Menu,
I do not know if Autofilter is on there, or not.......I would like to turn it
off if it has been left on........help please.....

Vaya con Dios,
Chuck, CABGx3


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default IF AutoFilter is on, turn it off

Hi,

Worksheets("Sheet1").AutoFilterMode = False


"CLR" wrote:

Hi all....

I know I can toggle the Autofilter on and off with the line
"Selection.Autofilter", but when I send a user to a Sheet from my Main Menu,
I do not know if Autofilter is on there, or not.......I would like to turn it
off if it has been left on........help please.....

Vaya con Dios,
Chuck, CABGx3


  #5   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default IF AutoFilter is on, turn it off

Thank you very much Kind Sir.

Vaya con dios,
Chuck, CABGx3



"Harald Staff" wrote:

Hi Chuck

Sub test()
MsgBox ActiveSheet.AutoFilterMode
End Sub

HTH. Best wishes Harald


"CLR" skrev i melding
...
Hi all....

I know I can toggle the Autofilter on and off with the line
"Selection.Autofilter", but when I send a user to a Sheet from my Main

Menu,
I do not know if Autofilter is on there, or not.......I would like to turn

it
off if it has been left on........help please.....

Vaya con Dios,
Chuck, CABGx3







  #6   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default IF AutoFilter is on, turn it off

Thanks very much!

Vaya con Dios,
Chuck, CABGx3




"quartz" wrote:

CLR, add the following line to your code:

If ActiveSheet.AutoFilterMode Then ActiveSheet.AutoFilterMode = False

HTH

"CLR" wrote:

Hi all....

I know I can toggle the Autofilter on and off with the line
"Selection.Autofilter", but when I send a user to a Sheet from my Main Menu,
I do not know if Autofilter is on there, or not.......I would like to turn it
off if it has been left on........help please.....

Vaya con Dios,
Chuck, CABGx3


  #7   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default IF AutoFilter is on, turn it off

Thank you very much.......of the ones suggested so far, I think this is the
method I prefer....

Thanks again,
Vaya con Dios,
Chuck, CABGx3





"Toppers" wrote:

Hi,

Worksheets("Sheet1").AutoFilterMode = False


"CLR" wrote:

Hi all....

I know I can toggle the Autofilter on and off with the line
"Selection.Autofilter", but when I send a user to a Sheet from my Main Menu,
I do not know if Autofilter is on there, or not.......I would like to turn it
off if it has been left on........help please.....

Vaya con Dios,
Chuck, CABGx3


  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 441
Default IF AutoFilter is on, turn it off

The only thing about Toppers version is, if auto filter is already off, it
generates an error. Unless of course you trap that error...?

"CLR" wrote:

Thank you very much.......of the ones suggested so far, I think this is the
method I prefer....

Thanks again,
Vaya con Dios,
Chuck, CABGx3





"Toppers" wrote:

Hi,

Worksheets("Sheet1").AutoFilterMode = False


"CLR" wrote:

Hi all....

I know I can toggle the Autofilter on and off with the line
"Selection.Autofilter", but when I send a user to a Sheet from my Main Menu,
I do not know if Autofilter is on there, or not.......I would like to turn it
off if it has been left on........help please.....

Vaya con Dios,
Chuck, CABGx3


  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default IF AutoFilter is on, turn it off

You sure?

It didn't cause an error for me.

Any chance your workbook didn't have a sheet named "sheet1"? That would cause
an error.

quartz wrote:

The only thing about Toppers version is, if auto filter is already off, it
generates an error. Unless of course you trap that error...?

"CLR" wrote:

Thank you very much.......of the ones suggested so far, I think this is the
method I prefer....

Thanks again,
Vaya con Dios,
Chuck, CABGx3





"Toppers" wrote:

Hi,

Worksheets("Sheet1").AutoFilterMode = False


"CLR" wrote:

Hi all....

I know I can toggle the Autofilter on and off with the line
"Selection.Autofilter", but when I send a user to a Sheet from my Main Menu,
I do not know if Autofilter is on there, or not.......I would like to turn it
off if it has been left on........help please.....

Vaya con Dios,
Chuck, CABGx3



--

Dave Peterson
  #10   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default IF AutoFilter is on, turn it off

WOW, thanks for the warning.....I was just about to test it when this post
came in......so, since I don't know how to "trap that error", I reckon I'll
fall back to using the method you suggested........I would have selected it
first except that I thought the other one would be easier for my little mind
to remember for next time.....

Thanks again,
Chuck, CABGx3



"quartz" wrote:

The only thing about Toppers version is, if auto filter is already off, it
generates an error. Unless of course you trap that error...?

"CLR" wrote:

Thank you very much.......of the ones suggested so far, I think this is the
method I prefer....

Thanks again,
Vaya con Dios,
Chuck, CABGx3





"Toppers" wrote:

Hi,

Worksheets("Sheet1").AutoFilterMode = False


"CLR" wrote:

Hi all....

I know I can toggle the Autofilter on and off with the line
"Selection.Autofilter", but when I send a user to a Sheet from my Main Menu,
I do not know if Autofilter is on there, or not.......I would like to turn it
off if it has been left on........help please.....

Vaya con Dios,
Chuck, CABGx3




  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default IF AutoFilter is on, turn it off

Try it anyway.

CLR wrote:

WOW, thanks for the warning.....I was just about to test it when this post
came in......so, since I don't know how to "trap that error", I reckon I'll
fall back to using the method you suggested........I would have selected it
first except that I thought the other one would be easier for my little mind
to remember for next time.....

Thanks again,
Chuck, CABGx3

"quartz" wrote:

The only thing about Toppers version is, if auto filter is already off, it
generates an error. Unless of course you trap that error...?

"CLR" wrote:

Thank you very much.......of the ones suggested so far, I think this is the
method I prefer....

Thanks again,
Vaya con Dios,
Chuck, CABGx3





"Toppers" wrote:

Hi,

Worksheets("Sheet1").AutoFilterMode = False


"CLR" wrote:

Hi all....

I know I can toggle the Autofilter on and off with the line
"Selection.Autofilter", but when I send a user to a Sheet from my Main Menu,
I do not know if Autofilter is on there, or not.......I would like to turn it
off if it has been left on........help please.....

Vaya con Dios,
Chuck, CABGx3



--

Dave Peterson
  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 441
Default IF AutoFilter is on, turn it off

Dave is right, my appologies to Toppers, CLR and the confusion my post
caused. Either code version will work.

"CLR" wrote:

WOW, thanks for the warning.....I was just about to test it when this post
came in......so, since I don't know how to "trap that error", I reckon I'll
fall back to using the method you suggested........I would have selected it
first except that I thought the other one would be easier for my little mind
to remember for next time.....

Thanks again,
Chuck, CABGx3



"quartz" wrote:

The only thing about Toppers version is, if auto filter is already off, it
generates an error. Unless of course you trap that error...?

"CLR" wrote:

Thank you very much.......of the ones suggested so far, I think this is the
method I prefer....

Thanks again,
Vaya con Dios,
Chuck, CABGx3





"Toppers" wrote:

Hi,

Worksheets("Sheet1").AutoFilterMode = False


"CLR" wrote:

Hi all....

I know I can toggle the Autofilter on and off with the line
"Selection.Autofilter", but when I send a user to a Sheet from my Main Menu,
I do not know if Autofilter is on there, or not.......I would like to turn it
off if it has been left on........help please.....

Vaya con Dios,
Chuck, CABGx3


  #13   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default IF AutoFilter is on, turn it off

It doesn't cause an error. I think quartz has it confused with ShowAllData

--
Regards,
Tom Ogilvy



"CLR" wrote in message
...
WOW, thanks for the warning.....I was just about to test it when this post
came in......so, since I don't know how to "trap that error", I reckon

I'll
fall back to using the method you suggested........I would have selected

it
first except that I thought the other one would be easier for my little

mind
to remember for next time.....

Thanks again,
Chuck, CABGx3



"quartz" wrote:

The only thing about Toppers version is, if auto filter is already off,

it
generates an error. Unless of course you trap that error...?

"CLR" wrote:

Thank you very much.......of the ones suggested so far, I think this

is the
method I prefer....

Thanks again,
Vaya con Dios,
Chuck, CABGx3





"Toppers" wrote:

Hi,

Worksheets("Sheet1").AutoFilterMode = False


"CLR" wrote:

Hi all....

I know I can toggle the Autofilter on and off with the line
"Selection.Autofilter", but when I send a user to a Sheet from my

Main Menu,
I do not know if Autofilter is on there, or not.......I would like

to turn it
off if it has been left on........help please.....

Vaya con Dios,
Chuck, CABGx3




  #14   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default IF AutoFilter is on, turn it off

Thanks Dave........I did, and (lol) I thought there was something wrong with
my machine, because it worked ok<g.......I do appreciate you catching this
tho.....

Thanks again,
Vaya con Dios,
Chuck, CABGx3



"Dave Peterson" wrote:

Try it anyway.

CLR wrote:

WOW, thanks for the warning.....I was just about to test it when this post
came in......so, since I don't know how to "trap that error", I reckon I'll
fall back to using the method you suggested........I would have selected it
first except that I thought the other one would be easier for my little mind
to remember for next time.....

Thanks again,
Chuck, CABGx3

"quartz" wrote:

The only thing about Toppers version is, if auto filter is already off, it
generates an error. Unless of course you trap that error...?

"CLR" wrote:

Thank you very much.......of the ones suggested so far, I think this is the
method I prefer....

Thanks again,
Vaya con Dios,
Chuck, CABGx3





"Toppers" wrote:

Hi,

Worksheets("Sheet1").AutoFilterMode = False


"CLR" wrote:

Hi all....

I know I can toggle the Autofilter on and off with the line
"Selection.Autofilter", but when I send a user to a Sheet from my Main Menu,
I do not know if Autofilter is on there, or not.......I would like to turn it
off if it has been left on........help please.....

Vaya con Dios,
Chuck, CABGx3



--

Dave Peterson

  #15   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default IF AutoFilter is on, turn it off

No problem, quartz.......
Thanks for participating and doing what you thought was the right
thing.....You're obviously 'way ahead of me with VBA, so please feel free to
jump in and help me at any time<g. I do appreciate you showing me a second
way to "skin the cat". You're right, both methods work fine.

Thanks again,
Vaya con Dios,
Chuck, CABGx3



"quartz" wrote:

Dave is right, my appologies to Toppers, CLR and the confusion my post
caused. Either code version will work.

"CLR" wrote:

WOW, thanks for the warning.....I was just about to test it when this post
came in......so, since I don't know how to "trap that error", I reckon I'll
fall back to using the method you suggested........I would have selected it
first except that I thought the other one would be easier for my little mind
to remember for next time.....

Thanks again,
Chuck, CABGx3



"quartz" wrote:

The only thing about Toppers version is, if auto filter is already off, it
generates an error. Unless of course you trap that error...?

"CLR" wrote:

Thank you very much.......of the ones suggested so far, I think this is the
method I prefer....

Thanks again,
Vaya con Dios,
Chuck, CABGx3





"Toppers" wrote:

Hi,

Worksheets("Sheet1").AutoFilterMode = False


"CLR" wrote:

Hi all....

I know I can toggle the Autofilter on and off with the line
"Selection.Autofilter", but when I send a user to a Sheet from my Main Menu,
I do not know if Autofilter is on there, or not.......I would like to turn it
off if it has been left on........help please.....

Vaya con Dios,
Chuck, CABGx3


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
2007 excel autofilter change back to 2003 autofilter? jonnybrovo815 Excel Discussion (Misc queries) 1 April 19th 10 05:53 PM
Macro turn off AutoFilter Erin Excel Worksheet Functions 2 February 26th 08 08:38 PM
Excel 2003 - turn off option in autofilter Gasper Excel Discussion (Misc queries) 1 February 1st 06 11:34 AM
Code to automatically turn on and turn off Track Changes John[_46_] Excel Programming 1 October 7th 03 02:22 AM
Turn AutoFilter off by code? Ed[_9_] Excel Programming 6 September 24th 03 01:18 AM


All times are GMT +1. The time now is 03:21 PM.

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"