Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All,
I have a situation that simplifies to the code below. My question is: When the userform unloads due to the admin button being clicked, and the correct password being entered, does control go back to the Workbook_Open code sub, and run the code after my 'Remainder comment? I seem to be getting inconsistent results from this is different situations, but obvoiusly that is me not understanding how it works. Hope that makes sense? Alan. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Private Sub Workbook_Open: ' Does stuff frmMainMenu.Show ' Remainder End Sub In userform: Private Sub cmdAdministration_Click() ' Allows the admin user to exit from code control and access the underlying spreadsheet InputPassword = InputBox("This will allow you to make manual adjustments directly to the database, add or change locations, types, sales reps etc." & Chr(13) & Chr(13) & _ "You will be outside the control of the system, and substantial damage could be caused to the database." & Chr(13) & Chr(13) & _ "If you are sure you want to continue, please enter the admin password, else click cancel.", "Administration Password Required") If InputPassword = Password Then Application.CalculateFull Application.Calculation = xlCalculationAutomatic Unload Me End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Where are the flow shape and flow connector tabs in Vista? | Charts and Charting in Excel | |||
How to create a macro to control data flow | Excel Discussion (Misc queries) | |||
How do I label flow connectors in and excel flow chart? | Excel Discussion (Misc queries) | |||
flow chart question | Charts and Charting in Excel | |||
UserForm Interaction | Excel Programming |