ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Protect/Unprotect function options (https://www.excelbanter.com/excel-programming/303798-protect-unprotect-function-options.html)

floss

Protect/Unprotect function options
 
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


François

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



Tom Ogilvy

Protect/Unprotect function options
 
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" wrote in message
...
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





François

Protect/Unprotect function options
 
HEllo Tom,

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

Thanks again,

François

"Tom Ogilvy" wrote:

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" wrote in message
...
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







All times are GMT +1. The time now is 02:45 PM.

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