Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

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,522 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 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

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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…
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…
Suggested Courses

688 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