ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro to FilterShowAll on Protected workbook (https://www.excelbanter.com/excel-programming/377070-macro-filter-showall-protected-workbook.html)

Jimbo

Macro to FilterShowAll on Protected workbook
 
I have a protected and shared workbook with data filters enabled. Often
users will exit the workbook and leave their data-filter choices ... making
it difficult for the next user.

I recorded a show-all macro that runs on a button but it gives a VB error
(something like) "that feature is not allowed on a protected workbook".

Any ideas how I can get around this limitation? Thanks.

Jay

Macro to FilterShowAll on Protected workbook
 
Hi Jimbo -

Try unprotecting the sheet before the "showall" method statement. Then
reprotect:

ActiveSheet.Unprotect
ActiveSheet.ShowAllData
ActiveSheet.Protect AllowFiltering:=True

Note that you may have to provide the protect and unprotect statements with
passwords or other settings as needed.
--
Jay


"Jimbo" wrote:

I have a protected and shared workbook with data filters enabled. Often
users will exit the workbook and leave their data-filter choices ... making
it difficult for the next user.

I recorded a show-all macro that runs on a button but it gives a VB error
(something like) "that feature is not allowed on a protected workbook".

Any ideas how I can get around this limitation? Thanks.


Jimbo

Macro to FilterShowAll on Protected workbook
 

I can't unprotect the worksheet without first un-sharing it ... and I don't
want the macro to kick-off other users.

"Jay" wrote:

Hi Jimbo -

Try unprotecting the sheet before the "showall" method statement. Then
reprotect:

ActiveSheet.Unprotect
ActiveSheet.ShowAllData
ActiveSheet.Protect AllowFiltering:=True

Note that you may have to provide the protect and unprotect statements with
passwords or other settings as needed.
--
Jay


"Jimbo" wrote:

I have a protected and shared workbook with data filters enabled. Often
users will exit the workbook and leave their data-filter choices ... making
it difficult for the next user.

I recorded a show-all macro that runs on a button but it gives a VB error
(something like) "that feature is not allowed on a protected workbook".

Any ideas how I can get around this limitation? Thanks.


Jay

Macro to FilterShowAll on Protected workbook
 
Can't help you then. I haven't yet worked in a shared environment. Sorry.
Somebody else will have to pick up on this thread.

I will research this, but it will take me a while so I'm going to bow out.

Good luck Jimbo,
--
Jay


"Jimbo" wrote:


I can't unprotect the worksheet without first un-sharing it ... and I don't
want the macro to kick-off other users.

"Jay" wrote:

Hi Jimbo -

Try unprotecting the sheet before the "showall" method statement. Then
reprotect:

ActiveSheet.Unprotect
ActiveSheet.ShowAllData
ActiveSheet.Protect AllowFiltering:=True

Note that you may have to provide the protect and unprotect statements with
passwords or other settings as needed.
--
Jay


"Jimbo" wrote:

I have a protected and shared workbook with data filters enabled. Often
users will exit the workbook and leave their data-filter choices ... making
it difficult for the next user.

I recorded a show-all macro that runs on a button but it gives a VB error
(something like) "that feature is not allowed on a protected workbook".

Any ideas how I can get around this limitation? Thanks.



All times are GMT +1. The time now is 09:06 PM.

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