ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Getting a file name using a built in dialog box (https://www.excelbanter.com/excel-programming/282836-getting-file-name-using-built-dialog-box.html)

Steven Revell

Getting a file name using a built in dialog box
 
Hi,

I was wondering how to get the filename (as opposed to
opening the file) from an excel built in dialog box. I can
do it in word but the same commands don't apply in excel
vba.

Thanks Steven

Tom Ogilvy

Getting a file name using a built in dialog box
 
fname = Application.GetOpenFileName( see help for arguments)

Shows the file open dialog, and returns the selected file(s) names as a
string ( or array, multiselect:=true) without opening the file.

Also Application.GetSaveAsFilename

--
Regards,
Tom Ogilvy

"Steven Revell" wrote in message
...
Hi,

I was wondering how to get the filename (as opposed to
opening the file) from an excel built in dialog box. I can
do it in word but the same commands don't apply in excel
vba.

Thanks Steven





All times are GMT +1. The time now is 12:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com