ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Protection and filters? (https://www.excelbanter.com/excel-programming/294922-protection-filters.html)

Paul

Protection and filters?
 
Using XL 2000

I have posted in worksheet functions aswell because i'm
open to solutions.

I have a workbook containing 3 worksheets.
I need a to prevent users from editing Worksheet1 but
allow the filter functionality.

Any ideas?

Thanks, Paul


Rowan

Protection and filters?
 
Pau

You can allow filtering on a protected sheet using the following code

With Worksheets("Sheet1"
.Unprotect Password:="YourPassword
If Not .AutoFilterMode The
.Range("A1").AutoFilte
End I

.EnableAutoFilter = Tru
.Protect Password:="YourPassword",
contents:=True, userinterfaceonly:=Tru
End Wit

Regard
Rowan

Frank Kabel

Protection and filters?
 
Hi
see your answer in Excel.worksheet.functions

--
Regards
Frank Kabel
Frankfurt, Germany


Paul wrote:
Using XL 2000

I have posted in worksheet functions aswell because i'm
open to solutions.

I have a workbook containing 3 worksheets.
I need a to prevent users from editing Worksheet1 but
allow the filter functionality.

Any ideas?

Thanks, Paul


Paul

Protection and filters?
 
Many thanks Rowan.
A perfect solution.

Paul

-----Original Message-----
Paul

You can allow filtering on a protected sheet using the

following code:

With Worksheets("Sheet1")
.Unprotect Password:="YourPassword"
If Not .AutoFilterMode Then
.Range("A1").AutoFilter
End If

.EnableAutoFilter = True
.Protect Password:="YourPassword", _
contents:=True, userinterfaceonly:=True
End With

Regards
Rowan
.



All times are GMT +1. The time now is 09:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com