Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi Brian Try this as an example. Name one of your worksheet as "WTD". I teste it out and it worked so you shouldn't have any problems. Private Sub auto_Open() Worksheets("WTD").Unprotect password:="template" Sub averagesort() Range("A6:AI36").Select ActiveWindow.ScrollRow = 6 Range("A3").Select Worksheets("WTD").Protect password:="template" End Sub Best regards, Ernest Goh brian thompson3001 via OfficeKB.com Wrote: Hi Ernest tried you alteration and the macro would not run. I copied and paste into "View Code" (right click on tab) worksheet name "WTD" Password "template" any ideas why? regards ernestgoh wrote: brian thompson3001 via OfficeKB.com Wrote: Hi d text clipped - 25 lines Wrote: -- bnt hi brian, you may use this : Private Sub auto_Open() Worksheets("-Name of your worksheet-").unprotect password:="template" Sub averagesort() Range("A6:AI36").Select Selection.Sort Key1:=Range("C6"), Order1:=xlDescending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlBottomToTop ActiveWindow.ScrollRow = 6 Range("A3").Select Worksheets("-Name of your worksheet-").protect password:="template" End Sub best regards, ernest goh -- bnt Message posted via http://www.officekb.com -- ernestgo ----------------------------------------------------------------------- ernestgoh's Profile: http://www.excelforum.com/member.php...fo&userid=2487 View this thread: http://www.excelforum.com/showthread.php?threadid=56185 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Password Protect | Excel Discussion (Misc queries) | |||
VBA password protect | New Users to Excel | |||
Password Protect | Excel Discussion (Misc queries) | |||
protect with password | Excel Programming | |||
Password protect | Excel Programming |