WantsToLearn
Programmer
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!
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!