Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 152
Default Macro - protection with filter

Hello. I have a protected worksheet with a macro that unprotects, sorts,
reprotects. I've had to add the below macro in order for the filters to
function when protected. All works fine THE FIRST TIME i open the file.
When i close the file and reopen it, the filters don't work, the sort macro
will not run - unless i completely shut down Excel and restart. I don't even
get the 'enable' macros window at opening.

Can anyone help please? I got the below of this site and am not sure if
this is what's causing the problem or not. Many many many thanks!

Sub auto_open()
With Worksheets("FCW Tracking Recs")
.Protect Password:="calibtn", userinterfaceonly:=True
.EnableAutoFilter = True
End With
End Sub

--
Thank you -- Suzanne.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 148
Default Macro - protection with filter

Hi suzanne, I'm ussing the following and this works for me:

Private Sub Workbook_Open()

With Worksheets("FCW Tracking Recs")
.EnableOutlining = True
.Protect Password:="calibtn", Contents:=True, UserInterfaceOnly:=True
End With

Rgds,

Danny

"Suzanne" wrote:

Hello. I have a protected worksheet with a macro that unprotects, sorts,
reprotects. I've had to add the below macro in order for the filters to
function when protected. All works fine THE FIRST TIME i open the file.
When i close the file and reopen it, the filters don't work, the sort macro
will not run - unless i completely shut down Excel and restart. I don't even
get the 'enable' macros window at opening.

Can anyone help please? I got the below of this site and am not sure if
this is what's causing the problem or not. Many many many thanks!

Sub auto_open()
With Worksheets("FCW Tracking Recs")
.Protect Password:="calibtn", userinterfaceonly:=True
.EnableAutoFilter = True
End With
End Sub

--
Thank you -- Suzanne.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 152
Default Macro - protection with filter

Thanks. It does work the 1st time i open the file, if i close and reopen i
don't ge the 'enable macro' window, when i to and run the macro i get the
'maybe your macro security is set to high...' When i exit excel and reopen,
works fine. Seems like it wants me to shut down excel each time i want to
reopen it... I appreciate your help.
--
Thank you -- Suzanne.


"Danny" wrote:

Hi suzanne, I'm ussing the following and this works for me:

Private Sub Workbook_Open()

With Worksheets("FCW Tracking Recs")
.EnableOutlining = True
.Protect Password:="calibtn", Contents:=True, UserInterfaceOnly:=True
End With

Rgds,

Danny

"Suzanne" wrote:

Hello. I have a protected worksheet with a macro that unprotects, sorts,
reprotects. I've had to add the below macro in order for the filters to
function when protected. All works fine THE FIRST TIME i open the file.
When i close the file and reopen it, the filters don't work, the sort macro
will not run - unless i completely shut down Excel and restart. I don't even
get the 'enable' macros window at opening.

Can anyone help please? I got the below of this site and am not sure if
this is what's causing the problem or not. Many many many thanks!

Sub auto_open()
With Worksheets("FCW Tracking Recs")
.Protect Password:="calibtn", userinterfaceonly:=True
.EnableAutoFilter = True
End With
End Sub

--
Thank you -- Suzanne.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 148
Default Macro - protection with filter

Hi Suzanne,

Try with setting your macro security to low

Tools
Macro
Security

I do not have an problem with this macro at all, maybe it is just you
security settings.

"Suzanne" wrote:

Thanks. It does work the 1st time i open the file, if i close and reopen i
don't ge the 'enable macro' window, when i to and run the macro i get the
'maybe your macro security is set to high...' When i exit excel and reopen,
works fine. Seems like it wants me to shut down excel each time i want to
reopen it... I appreciate your help.
--
Thank you -- Suzanne.


"Danny" wrote:

Hi suzanne, I'm ussing the following and this works for me:

Private Sub Workbook_Open()

With Worksheets("FCW Tracking Recs")
.EnableOutlining = True
.Protect Password:="calibtn", Contents:=True, UserInterfaceOnly:=True
End With

Rgds,

Danny

"Suzanne" wrote:

Hello. I have a protected worksheet with a macro that unprotects, sorts,
reprotects. I've had to add the below macro in order for the filters to
function when protected. All works fine THE FIRST TIME i open the file.
When i close the file and reopen it, the filters don't work, the sort macro
will not run - unless i completely shut down Excel and restart. I don't even
get the 'enable' macros window at opening.

Can anyone help please? I got the below of this site and am not sure if
this is what's causing the problem or not. Many many many thanks!

Sub auto_open()
With Worksheets("FCW Tracking Recs")
.Protect Password:="calibtn", userinterfaceonly:=True
.EnableAutoFilter = True
End With
End Sub

--
Thank you -- Suzanne.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help wanted for Advanced filter/sheet protection Kathrine Excel Worksheet Functions 0 March 28th 07 12:59 AM
Protection Macro Spheon Excel Discussion (Misc queries) 5 July 29th 06 01:16 PM
Cell protection & Auto Filter fastballfreddy Excel Worksheet Functions 1 May 11th 06 11:51 AM
Auto-Filter Not Working With Protection Turned On iwgunter Excel Discussion (Misc queries) 2 February 17th 06 04:51 PM
Filter Switches vs Sheet Protection? Ken Excel Discussion (Misc queries) 3 February 23rd 05 09:38 PM


All times are GMT +1. The time now is 02:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"