Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open a passworded worksheet from a worksheet in same workbook

Status
Not open for further replies.

striveforexcelence

Technical User
Oct 5, 2005
34
US
I have a worksheet that serves as a sort of splash page to provide the user information on products and product changes,etc. On this first worksheet, then, the user can choose between two command buttons - one runs a video turorial on how to use the program - the other (for users that are familiar with the program) needs to open a different sheet (inventory) and allow the user to bypass the tutorial. The inventory sheet has an onopen script that brings up a user form with an input box for a password. When the pasword is entered certain information specific to that location is autopopulated into the headings of the worksheet.

The tutorial works great from the first worksheet. How do I a) go best about getting the user to the other worksheet and b) make it so that the password user form still comes up?

Would you recommend a hyperlink? or vba code? Either way could someone please steer me through this process?

Thank you !
 
I'm not sure I understand the problem. I would activate the password Userform from the second CommandButton's Click event handler. If the login is successful, then activate the inventory sheet. This assumes that the inventory sheet is normally kept hidden (i.e. its Visible property is set to xlSheetVeryHidden). Code to do that would look something like:

Code:
With Worksheets("Inventory")
  .Visible = xlSheetVisible
  .Activate
End With

If changes to the workbook are allowed, then there will be the scondary issue of ensuring the inventory sheet is returned to xlSheetVeryHidden before saving.


Regards,
Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top