PDA

View Full Version : Solved: Show all sheets, Prompt bug



Adonaioc
09-05-2008, 07:47 AM
I have a document that I will be sending to customers that gives prices, those prices will pull from formulas on sheet 2 which is password protected. But in order to ensure the the password script runs i have to force them to accept macros to view the document. And because of the way it unhides the sheets it initiates the password prompt before it will let you see sheet 1. Its easy to just hit ok and it will take you to sheet 1 but i would rather have it more streamline for the customer experience.

I want it to give you the Macros sheet if you select disable and to go staight to sheet 1 without a password prompt if you select enable. Sheet 2 still needs to be protected thought. I hope thats clear I am attaching the Document

Bob Phillips
09-05-2008, 08:05 AM
Private Sub Workbook_Open()

'Macro Purpose: Unhide all worksheets since macros are enabled
Application.ScreenUpdating = False
Application.EnableEvents = False
Call ShowAllSheets
Application.ScreenUpdating = True
ThisWorkbook.Saved = True

If Sheet2.Name = ActiveSheet.Name Then Sheet1.Select
Application.EnableEvents = True

End Sub

Adonaioc
09-05-2008, 09:22 AM
You are incredible! Thanks you thank you thank you.