Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Remove filter in worksheets before running code

How do I include all sheets in a workbook when running the following:

If ActiveSheet.FilterMode Then
ActiveSheet.ShowAllData
End If

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Remove filter in worksheets before running code

Hi,

Sub Show_All()
For x = 1 To Worksheets.Count
If Sheets(x).FilterMode Then
Sheets(x).ShowAllData
End If
Next
End Sub

Mike

"gootroots" wrote:

How do I include all sheets in a workbook when running the following:

If ActiveSheet.FilterMode Then
ActiveSheet.ShowAllData
End If

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Remove filter in worksheets before running code

Hi Mike

It's stalling on X when put into the body of other code. Not quite sure why.



"Mike H" wrote:

Hi,

Sub Show_All()
For x = 1 To Worksheets.Count
If Sheets(x).FilterMode Then
Sheets(x).ShowAllData
End If
Next
End Sub

Mike

"gootroots" wrote:

How do I include all sheets in a workbook when running the following:

If ActiveSheet.FilterMode Then
ActiveSheet.ShowAllData
End If

Thanks

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Remove filter in worksheets before running code

Hi,

I'm not sure what you mean. There's no need to alter the code at all simply
run it as I posted it and it will clear the filters an all sheets

Mike

"gootroots" wrote:

Hi Mike

It's stalling on X when put into the body of other code. Not quite sure why.



"Mike H" wrote:

Hi,

Sub Show_All()
For x = 1 To Worksheets.Count
If Sheets(x).FilterMode Then
Sheets(x).ShowAllData
End If
Next
End Sub

Mike

"gootroots" wrote:

How do I include all sheets in a workbook when running the following:

If ActiveSheet.FilterMode Then
ActiveSheet.ShowAllData
End If

Thanks

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default Remove filter in worksheets before running code

Hi Mike,
You omitted Declaring X in your code & me thinks OP has Option Explicit
declared at top of module?


--
jb


"Mike H" wrote:

Hi,

I'm not sure what you mean. There's no need to alter the code at all simply
run it as I posted it and it will clear the filters an all sheets

Mike

"gootroots" wrote:

Hi Mike

It's stalling on X when put into the body of other code. Not quite sure why.



"Mike H" wrote:

Hi,

Sub Show_All()
For x = 1 To Worksheets.Count
If Sheets(x).FilterMode Then
Sheets(x).ShowAllData
End If
Next
End Sub

Mike

"gootroots" wrote:

How do I include all sheets in a workbook when running the following:

If ActiveSheet.FilterMode Then
ActiveSheet.ShowAllData
End If

Thanks



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Remove filter in worksheets before running code

John,

Good point, I never read that into the OP's response of 'stalling'

Mike

"john" wrote:

Hi Mike,
You omitted Declaring X in your code & me thinks OP has Option Explicit
declared at top of module?


--
jb


"Mike H" wrote:

Hi,

I'm not sure what you mean. There's no need to alter the code at all simply
run it as I posted it and it will clear the filters an all sheets

Mike

"gootroots" wrote:

Hi Mike

It's stalling on X when put into the body of other code. Not quite sure why.



"Mike H" wrote:

Hi,

Sub Show_All()
For x = 1 To Worksheets.Count
If Sheets(x).FilterMode Then
Sheets(x).ShowAllData
End If
Next
End Sub

Mike

"gootroots" wrote:

How do I include all sheets in a workbook when running the following:

If ActiveSheet.FilterMode Then
ActiveSheet.ShowAllData
End If

Thanks

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default Remove filter in worksheets before running code

Mike,
No worries, been guilty of it myself and on many occasions!
--
jb


"Mike H" wrote:

John,

Good point, I never read that into the OP's response of 'stalling'

Mike

"john" wrote:

Hi Mike,
You omitted Declaring X in your code & me thinks OP has Option Explicit
declared at top of module?


--
jb


"Mike H" wrote:

Hi,

I'm not sure what you mean. There's no need to alter the code at all simply
run it as I posted it and it will clear the filters an all sheets

Mike

"gootroots" wrote:

Hi Mike

It's stalling on X when put into the body of other code. Not quite sure why.



"Mike H" wrote:

Hi,

Sub Show_All()
For x = 1 To Worksheets.Count
If Sheets(x).FilterMode Then
Sheets(x).ShowAllData
End If
Next
End Sub

Mike

"gootroots" wrote:

How do I include all sheets in a workbook when running the following:

If ActiveSheet.FilterMode Then
ActiveSheet.ShowAllData
End If

Thanks

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
Filter and/or remove Names bronxbabe Setting up and Configuration of Excel 2 October 19th 09 09:38 AM
How do I remove a filter in excel? WTCAMB Excel Discussion (Misc queries) 1 July 28th 09 10:36 PM
while my c# code running ,clicks on excel document interrupts code Kayıhan Excel Programming 2 April 8th 09 11:54 AM
Unique Filter Code / Advanced Filter Fester[_2_] Excel Programming 1 October 30th 08 05:37 PM
Turn off a filter before running a macro Arno Excel Programming 5 September 26th 08 09:46 AM


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