Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Having trouble trying to make a form modal when using automation

Status
Not open for further replies.

WantsToLearn

Programmer
Feb 15, 2003
147
US
Hello,

I am controlling Excel using automation but I am having trouble getting my vb form to behave modally.

An example of the built in functionality I am trying to emulate would be the Data Sort dialog box in Excel. This dialog box prompts the user for the sort columns they wish to use. It is modal because you can't do anything else in Excel until you close the dialog box.

My form loads and displays OK but isn't modal. I tried adding the form as a dialog box and tried setting it via Show Mode:=vbModal but it is not working properly.

Here is what I want to happen:

1. User opens Excel
2. Using WithEvents my code traps the situation requiring the equivalent of an Excel DialogBox
3. My custom form pops up modally so Excel is stopped until the form is closed by the user
4. Excel continues

Any ideas on what is causing my problem? Thank you!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top