How would you make an excel openfile dialog to appear on top of an application which calls it?

Sandy Adriano
Sandy Adriano used Ask the Experts™
on
I am calling GetOpenFileName() in Visual Studio and I want it to always appear on top of my current Main Form.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
NorieAnalyst Assistant

Commented:
Sandy

How are you calling GetOpenFilename?

Author

Commented:
I declared xApp as an Excel application then call xApp.GetOpenFilename() method from VB 2015. I stored the filename generated in a string variable. My problem is my VB application is running the main form before I called the method. When I call it, it runs behind my VB application. I could not get it on top even by hitting Alt+Tab to get into it. I can get to it by going to the task manager and selecting the excel application and goto application option.
Software Team Lead
Commented:
VB2015 got its own "GetOpenFilename", try look for OpenFileDialog Control

VB.Net - OpenFileDialog Control
https://www.tutorialspoint.com/vb.net/vb.net_openfile_dialog

hence, you no need to call Excel's GetOpenFilename method in order to have a Open File Dialog box.

Author

Commented:
Thank you very much for the suggestions.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial