ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   autofilter on a protected sheet (https://www.excelbanter.com/excel-programming/425070-autofilter-protected-sheet.html)

Dave Unger

autofilter on a protected sheet
 
Hello,

I'm running a macro which unprotects a sheet, applies an autofilter,
then protects the sheet again with filtering enabled.

I'm wondering what the difference is between these 2 snippets, they
seem to be equivalent in this instance:

with wk
.EnableAutoFilter = True
.Protect UserInterfaceOnly:=True

versus

.Protect AllowFiltering:=True

Thanks for any insight on this,

regards,

DaveU

Simon Lloyd[_1055_]

autofilter on a protected sheet
 

This MS article should help you 'You are prompted for worksheet password
when you use the UserInterfaceOnly=True Protect method'
(http://support.microsoft.com/kb/810788)

Dave Unger;256202 Wrote:
Hello,

I'm running a macro which unprotects a sheet, applies an autofilter,
then protects the sheet again with filtering enabled.

I'm wondering what the difference is between these 2 snippets, they
seem to be equivalent in this instance:

with wk
.EnableAutoFilter = True
.Protect UserInterfaceOnly:=True

versus

.Protect AllowFiltering:=True

Thanks for any insight on this,

regards,

DaveU



--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=71510


Dave Peterson

autofilter on a protected sheet
 
Those granular levels of worksheet protection were added in xl2002.

The first code sample may have been written for xl2k or below (or has to support
lots of versions).



Dave Unger wrote:

Hello,

I'm running a macro which unprotects a sheet, applies an autofilter,
then protects the sheet again with filtering enabled.

I'm wondering what the difference is between these 2 snippets, they
seem to be equivalent in this instance:

with wk
.EnableAutoFilter = True
.Protect UserInterfaceOnly:=True

versus

.Protect AllowFiltering:=True

Thanks for any insight on this,

regards,

DaveU


--

Dave Peterson

Dave

autofilter on a protected sheet
 
Simon & Dave, thanks for your respnses, much appreciated.



On Mar 5, 7:48*am, Dave Peterson wrote:
Those granular levels of worksheet protection were added in xl2002. *


Dave, not quite sure what you mean




The first code sample may have been written for xl2k or below (or has to support
lots of versions).

I'm interpreting that to mean use this on xl2002+ - .Protect
AllowFiltering:=True

regards,

Dave



Dave Peterson

autofilter on a protected sheet
 
What version of excel are you using?

If you're using xl2002 or newer, then do Tools|Protection|protect sheet (or
xl2007's equivalent).

Notice all those options in the "allow all users of this worksheet to:" box?
Well, there were only 3 options in xl2k and below--Contents, Objects and
scenarios.

All that fine control (granular, like controlling a grain of sand) was added in
xl2002.

And if you never need to support xl2k or earlier, then that seems ok to me.



Dave wrote:

Simon & Dave, thanks for your respnses, much appreciated.

On Mar 5, 7:48 am, Dave Peterson wrote:
Those granular levels of worksheet protection were added in xl2002.


Dave, not quite sure what you mean


The first code sample may have been written for xl2k or below (or has to support
lots of versions).

I'm interpreting that to mean use this on xl2002+ - .Protect
AllowFiltering:=True

regards,

Dave


--

Dave Peterson

Dave

autofilter on a protected sheet
 
Sorry Dave, I neglected that bit of info. I'm using xl2007, but
coding for xl2002+

Thanks for your help,

DaveU

On Mar 5, 8:55*pm, Dave Peterson wrote:
What version of excel are you using?

If you're using xl2002 or newer, then do Tools|Protection|protect sheet (or
xl2007's equivalent).

Notice all those options in the "allow all users of this worksheet to:" box?
Well, there were only 3 options in xl2k and below--Contents, Objects and
scenarios.

All that fine control (granular, like controlling a grain of sand) was added in
xl2002.

And if you never need to support xl2k or earlier, then that seems ok to me.


Dave Peterson

autofilter on a protected sheet
 
There are differences between xl2007 and previous versions.

You may want to do some extensive testing in the earlier versions before
releasing your project.

Or if it's possible, you may want to develop in xl2002. Then the testing should
be simpler in xl2007.

Dave wrote:

Sorry Dave, I neglected that bit of info. I'm using xl2007, but
coding for xl2002+

Thanks for your help,

DaveU

On Mar 5, 8:55 pm, Dave Peterson wrote:
What version of excel are you using?

If you're using xl2002 or newer, then do Tools|Protection|protect sheet (or
xl2007's equivalent).

Notice all those options in the "allow all users of this worksheet to:" box?
Well, there were only 3 options in xl2k and below--Contents, Objects and
scenarios.

All that fine control (granular, like controlling a grain of sand) was added in
xl2002.

And if you never need to support xl2k or earlier, then that seems ok to me.


--

Dave Peterson

Dave

autofilter on a protected sheet
 
Thanks Dave

regards,

DaveU

On Mar 6, 7:31*am, Dave Peterson wrote:
There are differences between xl2007 and previous versions.

You may want to do some extensive testing in the earlier versions before
releasing your project.

Or if it's possible, you may want to develop in xl2002. *Then the testing should
be simpler in xl2007.





Dave wrote:

Sorry Dave, I neglected that bit of info. *I'm using xl2007, but
coding for xl2002+


Thanks for your help,


DaveU


On Mar 5, 8:55 pm, Dave Peterson wrote:
What version of excel are you using?


If you're using xl2002 or newer, then do Tools|Protection|protect sheet (or
xl2007's equivalent).


Notice all those options in the "allow all users of this worksheet to:" box?
Well, there were only 3 options in xl2k and below--Contents, Objects and
scenarios.


All that fine control (granular, like controlling a grain of sand) was added in
xl2002.


And if you never need to support xl2k or earlier, then that seems ok to me.


--

Dave Peterson- Hide quoted text -

- Show quoted text -




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

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