Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
bob bob is offline
external usenet poster
 
Posts: 16
Default protect sheet blocks filter

i have specified a range as unlocked but when i run a macro to copy a sheet
then protect the destination sheet the autofilter function is disabled. can
i use a filter on an unlocked range in a protected sheet.


' unlock filter range
Range("W12:AL12").Select
Selection.Locked = False
Selection.FormulaHidden = False

' add autofilter
Range("W12:AL12").Select
Selection.AutoFilter

're protect data sheet
ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True

're-protect test WB
ActiveWorkbook.Protect Structu=True, Windows:=False


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default protect sheet blocks filter

Hi Bob,

I have a feeling you will need to activate the autofilter.
The following snippet is from the Microsoft Help.

ActiveSheet.EnableAutoFilter = True
ActiveSheet.Protect contents:=True, userInterfaceOnly:=True

HTH

Steven


-----Original Message-----
i have specified a range as unlocked but when i run a

macro to copy a sheet
then protect the destination sheet the autofilter

function is disabled. can
i use a filter on an unlocked range in a protected sheet.


' unlock filter range
Range("W12:AL12").Select
Selection.Locked = False
Selection.FormulaHidden = False

' add autofilter
Range("W12:AL12").Select
Selection.AutoFilter

're protect data sheet
ActiveSheet.Protect DrawingObjects:=True,

Contents:=True,
Scenarios:=True

're-protect test WB
ActiveWorkbook.Protect Structu=True, Windows:=False


.

  #3   Report Post  
Posted to microsoft.public.excel.programming
bob bob is offline
external usenet poster
 
Posts: 16
Default protect sheet blocks filter

thanks for the help
"Dave Peterson" wrote in message
...
And .enableautofilter is one of those properties that excel doesn't

remember
when you reopen the workbook. I like to put this in Auto_open (or
workbook_open) so that the worksheet is protected the way I want when I

open it.

Steven Revell wrote:

Hi Bob,

I have a feeling you will need to activate the autofilter.
The following snippet is from the Microsoft Help.

ActiveSheet.EnableAutoFilter = True
ActiveSheet.Protect contents:=True, userInterfaceOnly:=True

HTH

Steven

-----Original Message-----
i have specified a range as unlocked but when i run a

macro to copy a sheet
then protect the destination sheet the autofilter

function is disabled. can
i use a filter on an unlocked range in a protected sheet.


' unlock filter range
Range("W12:AL12").Select
Selection.Locked = False
Selection.FormulaHidden = False

' add autofilter
Range("W12:AL12").Select
Selection.AutoFilter

're protect data sheet
ActiveSheet.Protect DrawingObjects:=True,

Contents:=True,
Scenarios:=True

're-protect test WB
ActiveWorkbook.Protect Structu=True, Windows:=False


.


--

Dave Peterson



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
Particulars data Filter from sheet 1 to sheet 2 automatically Sudipta Sen[_2_] Excel Worksheet Functions 4 September 7th 09 04:20 PM
Macro to allow auto filter after running password protect Roady Excel Discussion (Misc queries) 1 July 17th 08 06:34 PM
Protect Workbook Vs Protect Sheet Poor_pakistani New Users to Excel 4 May 25th 06 02:06 PM
Can I protect columns w/in a "List" using Protect Sheet? Diane Excel Discussion (Misc queries) 0 May 10th 06 03:30 PM
'Copy to' Advance Filter depend only on sheet ID not start sheet Sandy Yates Excel Worksheet Functions 0 April 4th 06 03:48 AM


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