Solved

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

Posted on 2001-07-24
5
1,471 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Suggested Courses
Course of the Month6 days, 13 hours left to enroll

623 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