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

Which dialog to use?

Status
Not open for further replies.

rvBasic

Programmer
Oct 22, 2000
414
BE
I have a VB6 program that controls (automates?) excel. As with any decent program, it has to open some files, depending on the user's criteria (or mood)

I found at least three different ways to present a File Dialog Box

1. VB6 Common dialog control
2. Excel's GetOpenFileName method
3. Office XP's FileDialog object and its properties and methods

All three have a similar look and feel, however there are some subtle differences when coding for them. e.g. GetOpenFileName has no InitDir parameter (but you can set a DefaultFilePath before calling the method!) FileFilter separator characters are not the same (pipe character for the common dialog, comma for the others), ...

And I'm almost sure that VB.NET will still offer a different possibility!

These differences are a constant source of frustration and irritation (anger?)

Questions:

Is anybody aware of a document comparing these different presentations?
Has anybody any recommendations for using which one, when ?


_________________________________
In theory, there is no difference between theory and practice. In practice, there is. [attributed to Yogi Berra]
 
Hi rvBasic,
If I was sure Common dialog is in the user's system - wouldl use it.
Excel's GetOpenFileName method can display dialog hidden under open windows (one of threads in this forum). Office XP's FileDialog object is available since XP, will generate error in older office versions.

combo

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top