Solved

VB6 - user input from form1 a 2nd time

Posted on 2011-02-15
7
282 Views
Last Modified: 2012-05-11
I have a project which starts with a form that asks the user for input (a file path) via a common dialog box. The user inputs the information requested then clicks a start button which launches my code which is in a module.

After some processing is done, I have a message box pop up asking the user if they have another file they want to process. If they select Yes then I have another MsgBox pop up that tells them to select the next file path and then press OK when they are ready to continue.

My problem is that I'm not able to figure out how to get it so that the user can interact with form1 while the MsgBox is up.
0
Comment
Question by:thach1ef2
  • 3
  • 3
7 Comments
 
LVL 14

Assisted Solution

by:VBClassicGuy
VBClassicGuy earned 100 total points
ID: 34901694
Message boxes are "modal", and the user can't interact with any other form in your project until the message box is unloaded.
0
 
LVL 9

Accepted Solution

by:
shadow77 earned 400 total points
ID: 34901922
Why not just omit the last MsgBox and repeat what you did to acquire the first file path?  When the user closes the common dialog box, you can process that as you would have processed your final MsgBox.
0
 

Author Comment

by:thach1ef2
ID: 34901954
VBClassicGuy :

Thank you. I'll have to figure out another way to do it.

shadow77:

I'm not quite sure how to code it so that everything stops and waits for the user to do something with the form before proceeding.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 9

Expert Comment

by:shadow77
ID: 34901982
The common dialog should stop everything, just as a MsgBox would do.  They're both modal, so the user can't do anything else until he clicks OK/Cancel/etc.
0
 

Author Comment

by:thach1ef2
ID: 34902070
Not exactly what I meant. But in writing my response to you I think I figured out what I was doing wrong.

I had all my controls about whether to continue or exit in the module so once I went back to the form, it meant that we were done and I needed to unload and close up shop.

I'm going to try putting the controls in the form itself rather than in the module and see if what you are saying will work.
0
 
LVL 9

Expert Comment

by:shadow77
ID: 34902125
OK.   If you'd like to post some code, we could look at it.
0
 

Author Comment

by:thach1ef2
ID: 34902155
Thanks for your help. When taking my control statements out of the module itself and placing them in the form, I was able to get things to stop and wait for user interaction with the form before proceeding.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now