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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling Dialog from Sub Main 1

Status
Not open for further replies.

fheyn

Programmer
Mar 22, 2001
198
DE
Hi,
My application normally doesn't use a dialog. In sub Main
I check some configration-data and if that file doesn't
exist or the data is incomplete I want to call a dialog
to enable the user to create the file and/or add the data.
However Settings(that's the dialog).Show exutes AFTER sub
Main ends and closing the dialog doesn't end the process.
What I want is to call the dialog and then continue sub
Main (which is calling other functions and procedures).
What do I wrong?
Any help appreciated
 
Hi,

open the dialog modally

Code:
Settings.Show vbModal
the execution of the sub will then resume when the dialogue is closed.
 
Looks like a simple case of showing a form modally.
Assuming the settings form is called frmSettings, try this:

Sub main()
Dim f As frmSettings
Set f = New frmSettings

MsgBox "Showing the form"

f.Show vbModal

MsgBox "I do not show up until the form is dismissed"

End Sub

 
thanks nicsin
I knew there was something like that but I didn't remember
the vbModal.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top