I use excel to create a new instance of Visio, in this Excel module VBA code:
Set visioApp = New Visio.Application 'early binding
Set visQDoc = visioApp.Documents.Open(fileSaveName)
Set pgs = visQDoc.Pages
When I come to close visio from Excel (via visioApp.Quit), visio lies behind Excel, and the visio windows dialogue box "Save visio file: Yes, No, Cancel" is sandwiched between excel on top and visio at the back.
How to I get Visio on top of Excel, so the Visio windows dialogue box is visible?
- One work around would be to suppress the windows dialogue box and code my own, but a general solution to getting visio 'on top' will help in other situations.
- AppActivate Application.Caption works well for Excel, but AppActivate visioApp.Caption is not available to me from intellisense.
- When Excel VBA drives the creation of visio pages, Visio gets the focus, but I'd prefer to get visio on top without using the creation of temporary pages. It would be a last resort.