Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Filter on a Protected Worksheet

Excel 97 SR-

Trying to allow Auto Filter on a Protected workbook. The following code works fine when I protect the worksheet and workbook. But then when I make it Shared I get a run-time error '1004' Protect method of worksheet type class failed whever I click on a new worksheet.

Private Sub Workbook_SheetActivate(ByVal Sh As Object
With ActiveShee
.EnableAutoFilter = Tru
.Protect DrawingObjects:=True,
contents:=True, Scenarios:=True, UserInterfaceOnly:=Tru
End Wit
End Su

Thank

Brenda
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,979
Default Filter on a Protected Worksheet

You can't change the protection in a shared workbook. There's more
information in the following MSKB article:

XL: Commands and Features Unavailable in Shared Workbook
http://support.microsoft.com/default.aspx?id=130560


Brenda wrote:
Excel 97 SR-2

Trying to allow Auto Filter on a Protected workbook. The following code works fine when I protect the worksheet and workbook. But then when I make it Shared I get a run-time error '1004' Protect method of worksheet type class failed whever I click on a new worksheet.

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
With ActiveSheet
.EnableAutoFilter = True
.Protect DrawingObjects:=True, _
contents:=True, Scenarios:=True, UserInterfaceOnly:=True
End With
End Sub


--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

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
Use auto filter in a protected worksheet James Excel Discussion (Misc queries) 6 June 2nd 15 03:18 AM
Worksheet protected-auto filter works, show all button dosen't. Pink Gorman Excel Discussion (Misc queries) 2 August 20th 08 05:42 PM
Using auto filter after my worksheet is protected LY Excel Worksheet Functions 2 July 28th 08 12:10 PM
Help with using Auto-filter in a protected Worksheet. Ayo Excel Discussion (Misc queries) 5 October 29th 07 04:10 PM
Auto Filter with Protected Worksheet JohnGuts Excel Worksheet Functions 4 April 24th 06 09:14 AM


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