LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 106
Default show all data issue

i want the drop downs to stay but i want the potential to have one of the
columns filtered to refresh to showing all. And i have taken all of my
advanced filters away due to the shared workbook and just have regular
filters.

" wrote:

Hi
In the Visual Basic Editor double click the "ThisWorkbook" part of
your project (beow the sheet names and before your code modules).
Paste in this sub.

Private Sub Workbook_Open()
'Remove any filter present on the Activesheet
With Activesheet
On Error Resume Next 'required if Advanced filter used
.ShowAllData
On Error GoTo 0
.AutoFilterMode = False 'Removes drop down arrows
End With
End sub

This will clear the advanced filter and any other filter dropdowns. If
you want to apply to a particular sheet replace ActiveSheet with
Worksheets("MySheetName").

It might also be a good idea to put the same code in the before close
event too, just to be sure.

Private Sub Workbook_BeforeClose(Cancel As Boolean)
'Remove any filter present on the Activesheet
With Activesheet
On Error Resume Next 'required if Advanced filter used
.ShowAllData
On Error GoTo 0
.AutoFilterMode = False 'Removes drop down arrows
End With
End sub

Note that the Open and BeforeClose macros only go in the Thisworkbook
module. you can see other macros in here by selecting Workbook instead
of General at the top left dropdown menu and viewing/inserting the
macros listed in the top right dropdown menu.

regards
Paul

On Jun 24, 2:01 pm, Belinda7237
wrote:
I am having filter issues in a shared workbook. I am thinking that I can
solve this by having a code like this:

ActiveSheet.ShowAllData

inserted so that when each person opens the shared workbook it will clear
current filters for that user.

can i use this code in a shared workbook with multiple people in it and
filtering at the same time? If so, where do i put this code? i am only
familar with creating control buttons and are not familar with where to put
code on open for excel?

Thanks



 
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
Pivot Tables: Don't show data for detail, but still show subtotals Lynndyhop Excel Worksheet Functions 3 February 8th 10 11:51 AM
issue copying data Sj Excel Discussion (Misc queries) 2 August 16th 09 03:12 PM
Pivot tables - how to show only show data or < $10k pattyb Excel Discussion (Misc queries) 2 December 19th 08 09:30 PM
Possible Data Type Issue shelfish Excel Programming 3 May 31st 08 11:18 PM
how do i sort a worksheet data to show repetitve data and show mrcheatherington Excel Worksheet Functions 1 December 30th 07 02:26 PM


All times are GMT +1. The time now is 10:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"