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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Addin runtime error (401)

Status
Not open for further replies.

klearning

Programmer
Sep 16, 2002
1
US
I have written an Excel COM Addin in Visual Basic. When I run my Addin I get some interesting behavior. If in an Excel spreadsheet I have clicked in a cell and started typing, and then try to load a form from the addin by choosing from the menu (without un-clicking the cell I was typing in--so that Excel is in some sort of "type" or "edit" mode at that point) I get the following error:

"Runtime error 401: can't show non-modal form when modal form is displayed"

If I run a VBA addin in the same way, when selected the menu choices do not perform any action so this runtime error does not occur. I am wondering how this differs from VBA to VB and how I can get my VB code to work like this, and to not try to load the form if Excel is in this "edit" state.

Any advice? Thanks in advance!
klearning
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top