LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 188
Default Flow of control in VBA Question - Userform Interaction

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Where are the flow shape and flow connector tabs in Vista? brad Charts and Charting in Excel 1 March 29th 08 04:53 AM
How to create a macro to control data flow JW_4222 Excel Discussion (Misc queries) 1 March 28th 08 02:33 PM
How do I label flow connectors in and excel flow chart? Hannah Excel Discussion (Misc queries) 1 September 7th 06 07:55 PM
flow chart question sunrosejenn Charts and Charting in Excel 3 March 1st 06 09:53 PM
UserForm Interaction Bob Phillips[_5_] Excel Programming 0 September 22nd 03 08:12 PM


All times are GMT +1. The time now is 09:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"