PC Review


Reply
Thread Tools Rate Thread

Allow users of protected sheet to use macro involving custom filte

 
 
Roady
Guest
Posts: n/a
 
      17th Jun 2008
Hi:

I have created a macro that works for me when unprotected. However, when I
re-protect it before sending to mass users, it will not allow the custom
filter part of the macro to occur and returns an error. I have tried checking
the box in 'Protection'- 'Protect Sheet' that allows auto filter but there
does not seem to be an option for custom filter. Is there a way around this
without un-protecting the sheet? thank you!
 
Reply With Quote
 
 
 
 
Pete_UK
Guest
Posts: n/a
 
      17th Jun 2008
What you would normally do is to include two lines in your macro - one
immediately before what you want the user to do will unprotect the
sheet (by having the password embedded within the macro) and one
immediately after to protect the worksheet again.

You should note that users who have Excel 2000 and earlier will not be
able to use autofilter when a sheet is protected.

Hope this helps.

Pete

On Jun 17, 2:48*pm, Roady <Ro...@discussions.microsoft.com> wrote:
> Hi:
>
> I have created a macro that works for me when unprotected. However, when I
> re-protect it before sending to mass users, it will not allow the custom
> filter part of the macro to occur and returns an error. I have tried checking
> the box in 'Protection'- 'Protect Sheet' that allows auto filter but there
> does not seem to be an option for custom filter. Is there a way around this
> without un-protecting the sheet? thank you!


 
Reply With Quote
 
Roady
Guest
Posts: n/a
 
      17th Jun 2008
Can I do this by including the un-protect/re-protect step in the macro as I
am recording it? sort of book-end the macro with the password protection at
both ends?

"Pete_UK" wrote:

> What you would normally do is to include two lines in your macro - one
> immediately before what you want the user to do will unprotect the
> sheet (by having the password embedded within the macro) and one
> immediately after to protect the worksheet again.
>
> You should note that users who have Excel 2000 and earlier will not be
> able to use autofilter when a sheet is protected.
>
> Hope this helps.
>
> Pete
>
> On Jun 17, 2:48 pm, Roady <Ro...@discussions.microsoft.com> wrote:
> > Hi:
> >
> > I have created a macro that works for me when unprotected. However, when I
> > re-protect it before sending to mass users, it will not allow the custom
> > filter part of the macro to occur and returns an error. I have tried checking
> > the box in 'Protection'- 'Protect Sheet' that allows auto filter but there
> > does not seem to be an option for custom filter. Is there a way around this
> > without un-protecting the sheet? thank you!

>
>

 
Reply With Quote
 
Gord Dibben
Guest
Posts: n/a
 
      17th Jun 2008
Not while recording but you can edit afterward.

Sub Macro1()

ActiveSheet.Unprotect Password:="justme"
do your recorded stuff
ActiveSheet.Protect Password:="justme"

End Sub


Gord Dibben MS Excel MVP

On Tue, 17 Jun 2008 07:54:01 -0700, Roady <(E-Mail Removed)>
wrote:

>Can I do this by including the un-protect/re-protect step in the macro as I
>am recording it? sort of book-end the macro with the password protection at
>both ends?
>
>"Pete_UK" wrote:
>
>> What you would normally do is to include two lines in your macro - one
>> immediately before what you want the user to do will unprotect the
>> sheet (by having the password embedded within the macro) and one
>> immediately after to protect the worksheet again.
>>
>> You should note that users who have Excel 2000 and earlier will not be
>> able to use autofilter when a sheet is protected.
>>
>> Hope this helps.
>>
>> Pete
>>
>> On Jun 17, 2:48 pm, Roady <Ro...@discussions.microsoft.com> wrote:
>> > Hi:
>> >
>> > I have created a macro that works for me when unprotected. However, when I
>> > re-protect it before sending to mass users, it will not allow the custom
>> > filter part of the macro to occur and returns an error. I have tried checking
>> > the box in 'Protection'- 'Protect Sheet' that allows auto filter but there
>> > does not seem to be an option for custom filter. Is there a way around this
>> > without un-protecting the sheet? thank you!

>>
>>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I allow users to fill down on a protected sheet? AOEO Microsoft Excel Misc 1 28th Jan 2009 07:32 PM
custom views in protected sheet Bill Kuunders Microsoft Excel Discussion 0 6th May 2006 10:36 PM
Custom View in a Protected Sheet jose luis Microsoft Excel Programming 0 20th Sep 2004 08:09 PM
excel - macro code to open a protected sheet, enter passowrd, and then protect sheet arunjoshi Microsoft Excel Programming 1 2nd May 2004 03:50 PM
Custom dialog box on protected sheet Paul Martin Microsoft Excel Programming 2 6th Nov 2003 11:22 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:12 AM.