Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / February 2007

Tip: Looking for answers? Try searching our database.

View Custom View with Sheet Protection

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John H - 16 Feb 2007 16:19 GMT
I have excel running estimates for me.  I have 3 diff prices which can be
picked from.  I have this all set up.  I want to lock the prices so noone can
change them.  I also have custom views set up, so that instead of print 5
pages, you can print out only the information important to your estimate.  
But when I lock the price cells, I can not access my custom views.  Is there
a way to set this up diff, so I can still lock the cells i need locked and
view my custom views?

Thanks
John
Gord Dibben - 16 Feb 2007 17:54 GMT
John

You will have unprotect, change views then reprotect.

Best way to do this is with a macro.

Sub Change_View()
   ActiveSheet.Unprotect Password:="justme"
         ActiveWorkbook.CustomViews("my view").Show
   ActiveSheet.Protect Password:="justme"
End Sub

If you are wanting to change views for printing, use this code in Thisworkbook.

Private Sub Workbook_BeforePrint(Cancel As Boolean)
     ActiveSheet.Unprotect Password:="justme"
           ActiveWorkbook.CustomViews("my view").Show
                  ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
                  ActiveWorkbook.CustomViews("other view").Show
        ActiveSheet.Protect Password:="justme"
End Sub

Gord Dibben  MS Excel MVP

>I have excel running estimates for me.  I have 3 diff prices which can be
>picked from.  I have this all set up.  I want to lock the prices so noone can
[quoted text clipped - 6 lines]
>Thanks
>John
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.