Code to Create Input Box To Select a File

  • Thread starter Thread starter Jeremy
  • Start date Start date
J

Jeremy

I am looking to crate an input box that will allow the user to select a file.
This will be like the browes option. The file selected will not need to be
opened, just have the full path entered in the cell. This will be used to
formualte a VLOOKUP form the selected closed file.
 
You could use code similar to this...

Dim FileName As String
FileName = Application.GetOpenFilename
Range("A1").Value = FileName

but you should look up the GetOpenFilename method in the help files as there
are some optional arguments available that will let you customize things a
little bit.

Rick
 

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

Back
Top