Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 114
Default Application.GetOpenFilename vs Application.Dialogs(xlDialogsOpen)

Hi all

GetOpenFilename and Dialogs(xlDialogsOpen) seem almost identical, with
the latter having an advantage of not having to filter for XL files,
but the former having slightly more flexility. Generally I've been
using GetOpenFilename, but it seems that Dialogs(xlDialogsOpen) is more
efficient (code-wise). Can anyone shed any further light as to which
is the better to use?

Thanks in advance

Paul Martin
Melbourne, Australia

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default Application.GetOpenFilename vs Application.Dialogs(xlDialogsOpen)

"Paul Martin" wrote in message
ups.com...
GetOpenFilename and Dialogs(xlDialogsOpen) seem almost identical, with
the latter having an advantage of not having to filter for XL files,
but the former having slightly more flexility. Generally I've been
using GetOpenFilename, but it seems that Dialogs(xlDialogsOpen) is more
efficient (code-wise). Can anyone shed any further light as to which
is the better to use?


Hi Paul,

Which one is better all depends on what you're trying to do. But I would
hazard a guess that most developers most of the time want to have complete
control over the process of opening a workbook from their applications. You
get This with Application.GetOpenFilename, because all it does is return the
full path and filename selected by the user as a string. The rest is up to
you. With Application.Dialogs(xlDialogsOpen) Excel attempts to open the file
selected by the user unconditionally.

--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/

* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 114
Default Application.GetOpenFilename vs Application.Dialogs(xlDialogsOpen)

Hi Rob

Thanks for your prompt response.

BTW, I recently purchased two of your books - I'm especially impressed
by your Professional Excel Development. Great stuff!

Regards

Paul

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Application.GetOpenFilename vs Application.Dialogs(xlDialogsOpen)

Also, the Dialogs option only works with Excel 2002 on, not earlier
versions.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Rob Bovey" wrote in message
...
"Paul Martin" wrote in message
ups.com...
GetOpenFilename and Dialogs(xlDialogsOpen) seem almost identical, with
the latter having an advantage of not having to filter for XL files,
but the former having slightly more flexility. Generally I've been
using GetOpenFilename, but it seems that Dialogs(xlDialogsOpen) is more
efficient (code-wise). Can anyone shed any further light as to which
is the better to use?


Hi Paul,

Which one is better all depends on what you're trying to do. But I

would
hazard a guess that most developers most of the time want to have complete
control over the process of opening a workbook from their applications.

You
get This with Application.GetOpenFilename, because all it does is return

the
full path and filename selected by the user as a string. The rest is up to
you. With Application.Dialogs(xlDialogsOpen) Excel attempts to open the

file
selected by the user unconditionally.

--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/

* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default Application.GetOpenFilename vs Application.Dialogs(xlDialogsOpen)

"Bob Phillips" wrote in message
...
Also, the Dialogs option only works with Excel 2002 on, not earlier
versions.


Hi Bob,

The Application.Dialogs collection has been around since Excel 97. Or
were you talking about something different?

--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/

* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Application.GetOpenFilename vs Application.Dialogs(xlDialogsOpen)

Hi Rob,

You are absolutely correct. I wasn't thinking that Application.Dialogs was
new, but thinking that the xlDialogOpen option was.

On re-checking it, I can see I was thinking of the File Browser dialog,
Application.FileDialog. Ah well ...

Regards

Bob


"Rob Bovey" wrote in message
...
"Bob Phillips" wrote in message
...
Also, the Dialogs option only works with Excel 2002 on, not earlier
versions.


Hi Bob,

The Application.Dialogs collection has been around since Excel 97. Or
were you talking about something different?

--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/

* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Application.Dialogs(xlDialogPrint).Show - prints too soon Almagg via OfficeKB.com Excel Discussion (Misc queries) 3 April 27th 07 08:17 PM
Problems with application.Dialogs(xlDialogFormulaFind).Show lydya Excel Programming 2 December 18th 04 05:02 PM
How to disable the Application Dialogs Philip Excel Programming 1 November 5th 04 08:50 PM
Application.Dialogs(xlDialogFormulaFind).....HELP!!!!!! jason Excel Programming 2 October 1st 04 12:47 PM
application.dialogs(xlDialogSaveAs) AND CHDIR Jules[_2_] Excel Programming 1 September 3rd 03 08:27 PM


All times are GMT +1. The time now is 08:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"