LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Cannot Reset a Protected List

Thank you very much Gary, it worked!
--
Merci!
Bonzai


"Gary Keramidas" wrote:

try something like this

Sub Reset()
Dim ws As Worksheet
Set ws = Worksheets("Sheet1")
With ws
.Unprotect Password:="password"
With .Range("A6")
.AutoFilter Field:=1
.AutoFilter Field:=2
End With
.Protect Password:="password"
End With

End Sub

--


Gary


"Bonzai" wrote in message
...
Using Excel 2003. I created a Reset Macro to reset all AutoFilters to "All"
in a list. The macro looks like:

Sub Reset()
Range("A6").Select
Selection.AutoFilter Field:=1
Range("B6").Select
Selection.AutoFilter Field:=2
End Sub

The above works fine until I password-protect the worksheet, and then I get
a "Run Time Error 1004 , cannot use this command on a protected t sheet".
Even though I allow users to Sort & Use Autofilter. Any suggestions? Thanks
in advance for your help.

--
Merci!
Bonzai




 
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
Need Macro to reset dependent list Bean Counter[_2_] Excel Discussion (Misc queries) 2 May 12th 10 06:07 PM
Reset Validation cells to first list value FirstVette52 Excel Discussion (Misc queries) 6 February 1st 09 04:57 PM
Reset Validation lists to display 1st value in list Matt.Russett Excel Programming 1 March 13th 07 08:30 PM
Validation List - Reset to Top Value? Dan von InfoPath Excel Programming 1 September 28th 06 09:04 PM
VBA How to Reset a List box wejofost Excel Programming 2 January 28th 06 04:32 PM


All times are GMT +1. The time now is 05:13 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"