Getting a file name using a built in dialog box

S

Steven Revell

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
 
T

Tom Ogilvy

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top