Solved

Run-time error '406': Non-modal forms cannot be displayed in this host application from an ActiveX DLL, ActiveX Control, or Property Page.

Posted on 2004-09-13
1
2,197 Views
Last Modified: 2012-08-14
If this is the wrong Topic, pls inform me !

I have a Gupta-Program, in which I call a VB-Dll I've got from a friend
The Program looks like

Variables:
    COM Proxy Class: Advanced_Function
    Boolean: bOk
Actions:
    Set bOk = w_AdvancedFunction.Create(  )
    Set bOk = bOk AND w_AdvancedFunction.mFormShow(  )

On FormShow I get the Error "Run-time error '406': Non-modal forms cannot be displayed in this host application from an ActiveX DLL, ActiveX Control, or Property Page at line 5".

My friend told me the dll works fine when calling it from a Visual-Basic or a VC++ -Program.
Can anybody tell me, where this error comes from, and how can I change my Program ( or my friend can change his dll) so that it works ?

Thx in advance


0
Comment
Question by:PetraG
[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
1 Comment
 
LVL 10

Accepted Solution

by:
anv earned 80 total points
ID: 12042448
when u open the form where u r using this dll
make that form non modal...

say in my App... form1 uses the above dll...
and this form has a code that open the form of the dll...which is non-modal

so when u open form1.. u open it as non-modal.
like

form1.show vbModeless

u wont get the error
0

Featured Post

[Webinar] 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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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
Course of the Month5 days, 14 hours left to enroll

626 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