Solved

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

Posted on 2001-07-24
5
1,405 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 100 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
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…

821 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