Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

run time error 401 -- cant show non-modal form while a modal form is display

Posted on 2001-07-24
5
Medium Priority
?
1,573 Views
Last Modified: 2012-06-27
i got a run time error 401 -- cant show non-modal form while a modal form is display

the error fired when a msgbox loaded with deafult parameters and another form is activate and includes a timer control

this error occurs only in 1 computer  while another 5 computers works fine.

the environment is:
win-95
vb-6 SP3


0
Comment
Question by:adl
  • 3
5 Comments
 
LVL 28

Expert Comment

by:Ark
ID: 6311515
Can you provide code?

Cheers
0
 
LVL 4

Accepted Solution

by:
vindevogel earned 200 total points
ID: 6311562
You've got your form as a modal form (form.show vbModal)
In that form, you want to display another messagebox ...

That's not allowed by Windows.


You must either show your form not modal and then popup the messagebox.

But, I guess that you put it modal to ensure that the user clicks one of the buttons on the form ....
You'll have to check that off with a global variable (that is changed when the user clicks one of the buttons) and you can put your form "always on top" to simulate the modal effect.  There's enough code on this site on how to display a form always on top.
0
 

Author Comment

by:adl
ID: 6311861
thanks for the comments but
i dont have any modal forms

also on other computers tested i dont have this problem
0
 
LVL 4

Expert Comment

by:vindevogel
ID: 6312385
run time error 401 -- cant show non-modal form while a modal form is display

with no modal forms, this is a curious run time error.
0
 
LVL 4

Expert Comment

by:vindevogel
ID: 6441360
Why did you grade this C ?
I consider this a blame on my record !
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…
Suggested Courses

916 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