Maximize and Protect Worksheet

  • Thread starter Thread starter DDBeards
  • Start date Start date
D

DDBeards

I am trying to lock two out of three pages or a workbook plus Maximize the
workbook upon open. I can not get the Maximize to work. Someone please tell
me the secret to the maximize command in Excel with a locked page.

Thanks

DDBeards
 
To keep window in maximize state:
Application.WindowState = xlMaximized

To protect workbook from its closure or renaming of sheets etc.: -
workbooks("workbookname").protect password:="your password", structure:=true, windows:=true

To protect worksheets: -
workbooks("workbookname").sheets("Yoursheet").protect password:="your password"



Note:- with this macro you cannot close the workbook directly.
You need to un-protect workbook before closing the same, since protecting "windows:=true" command will restrict closure of the workbook.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top