Protect/Unprotect function options

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I need to allow "Autofiltering=True" when the protect function turns on. Tried to create a macro for protect to get a code sample but could not make it work with the following functions:

Private Function unprotectSh(Sh As String)
z = "me"
unprotectSh = Sheets(Sh).unprotect(z)
End Function

Private Function protectSh(Sh As String)
z = "me"
protectSh = Sheets(Sh).protect(z)
End Function

When protect funtions executes, autofilter on the worksheet doesnot work.

Your help in this is greatly appreciatied, thank you.
Sincerely,
Floss
 
If the arrows are already present:
Private Function protectSh(Sh As String)
z = "me"
with sheets(Sh)
.Protect Password:=z, userinterfaceonly:=True
.EnableAutoFilter = True
end with
End Function
 
Hello Dave or Floss,

I take you post and I'm not able to have access to the contents of the
autofilter.
I see well the arrow on each cell. However nothing appends if I click on it.

Thanks for your help.
Francois
 
did you run Dave Peterson's code providing the name of the sheet where the
autofilter arrows are? (and providing the correct password of course).

--
Regards,
Tom Ogilvy

François said:
Hello Dave or Floss,

I take you post and I'm not able to have access to the contents of the
autofilter.
I see well the arrow on each cell. However nothing appends if I click on it.

Thanks for your help.
Francois
on. Tried to create a macro for protect to get a code sample but could not
make it work with the following functions:
 
HEllo Tom,

Thanks for helping me. IN the mean time, I have found the problem.

Thanks again,

François
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top