![]() |
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 |
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 |
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 |
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 |
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 |
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 |
All times are GMT +1. The time now is 08:28 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com