Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Protect with AllowFiltering

Following syntax isn't accepted by Excel:
activesheet.protect allowfiltering:=true
(error 1004)

Wasn't it available in Office 2000 ? If it's the problem, then is there
another way to lock the whole sheet while filter remains enabled ?

Thanks!


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 67
Default Protect with AllowFiltering

Hello
Your code won't work with Excel2000.
Place this code into thisworkbook and amend accordingly:
Private Sub Workbook_Open()
Feuil1.EnableAutoFilter = True 'amend sheet codename
Feuil1.Protect Contents:=True, UserInterfaceOnly:=True 'amend sheetcodename
End Sub

Cordially
Pascal


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Protect with AllowFiltering

OK, perfect!
This works fine, thanks Pascal!
Doesn't need to be in the Workbook codemodule though, so even better!

Jérémie

"papou" <cestpasbon@çanonplus schrieb im Newsbeitrag
...
Hello
Your code won't work with Excel2000.
Place this code into thisworkbook and amend accordingly:
Private Sub Workbook_Open()
Feuil1.EnableAutoFilter = True 'amend sheet codename
Feuil1.Protect Contents:=True, UserInterfaceOnly:=True 'amend
sheetcodename
End Sub

Cordially
Pascal




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Protect with AllowFiltering

Unless something has changed,
If it isn't, then it won't work the next time you open the workbook.

It has to be set each time as it is non-persistent when done this way.

You might want to do some additional testing.

--
Regards,
Tom Ogilvy


"Jérémie Gent" wrote:

OK, perfect!
This works fine, thanks Pascal!
Doesn't need to be in the Workbook codemodule though, so even better!

Jérémie

"papou" <cestpasbon@çanonplus schrieb im Newsbeitrag
...
Hello
Your code won't work with Excel2000.
Place this code into thisworkbook and amend accordingly:
Private Sub Workbook_Open()
Feuil1.EnableAutoFilter = True 'amend sheet codename
Feuil1.Protect Contents:=True, UserInterfaceOnly:=True 'amend
sheetcodename
End Sub

Cordially
Pascal





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Protect with AllowFiltering

Thanks a lot to both of you, you're right, and I was wrong!

Now everything is working fine!

Best
Jérémie

"Tom Ogilvy" schrieb im Newsbeitrag
...
Unless something has changed,
If it isn't, then it won't work the next time you open the workbook.

It has to be set each time as it is non-persistent when done this way.

You might want to do some additional testing.

--
Regards,
Tom Ogilvy


"Jérémie Gent" wrote:

OK, perfect!
This works fine, thanks Pascal!
Doesn't need to be in the Workbook codemodule though, so even better!

Jérémie

"papou" <cestpasbon@çanonplus schrieb im Newsbeitrag
...
Hello
Your code won't work with Excel2000.
Place this code into thisworkbook and amend accordingly:
Private Sub Workbook_Open()
Feuil1.EnableAutoFilter = True 'amend sheet codename
Feuil1.Protect Contents:=True, UserInterfaceOnly:=True 'amend
sheetcodename
End Sub

Cordially
Pascal







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
Can protect worksheet then workbook but not Protect and Share in code [email protected] Excel Programming 7 January 16th 17 07:01 AM
Protect Workbook Vs Protect Sheet Poor_pakistani New Users to Excel 4 May 25th 06 02:06 PM
Protect UserInterface VS Protect/Unprotect Desert Piranha[_44_] Excel Programming 2 February 1st 06 03:08 AM
Disable Tools, Protect, Protect Workbook Paul Moles Excel Programming 1 September 5th 05 03:37 PM
Lock and protect cells without protect the sheet Christian[_7_] Excel Programming 6 December 28th 04 04:50 PM


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