Browse for a File from Excel VBA

AJ. picture AJ. · Oct 21, 2008 · Viewed 18.2k times · Source

How can I put up a "File Open" dialog from some VBA running in Excel?

I'm using Excel 2003.

Answer

tzot picture tzot · Oct 21, 2008

You want the Application.GetOpenFilename function. Copying from VBA Object Browser:

Function GetOpenFilename([FileFilter], [FilterIndex], [Title], [ButtonText], [MultiSelect])
Member of Excel.Application