HiI am trying to call a macro with a non-modal form from within another macro, which also has a non-modal form. Most of the time it works just fine.However, about half of the time when I run the code, I get this "Can't show non-modal form when modal form is displayed" error.
Any idea why this is happening and how can I avoid it ?
Below a screenshot of the secondary macro that is being called from the main macro, when the error happens.
I am using Microstation Connect Edition - v.10.15.02.11 Windows x64.Many thanks in advance.Paul
Hi Paul,
Paul Mitache said:I get this "Can't show non-modal form when modal form is displayed" error.
This is not MicroStation specific, but general VBA question, so I recommend to search and ask in VBA forums. Maybe StackOverflow or similar programming webs?.
Paul Mitache said:Any idea why this is happening and how can I avoid it ?
The error message is pretty clear and I think it specify exactly why it happens: There is modal form opened when you open another non-modal form from the same or related code.
I thin nothing more can be said without your code analysis.
Paul Mitache said:Below a screenshot of the secondary macro
It is ugly: Why standard VBA constants vbModal and vbModeless are not used?
Regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Thank you, Jan. I will go check SO. Cheers.