View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
François François is offline
external usenet poster
 
Posts: 40
Default Protect/Unprotect function options

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

"Dave Peterson" wrote:

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



Floss wrote:

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


--

Dave Peterson