Select File names and select a location of file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to use a Dialog box to select multiple files and then display
the name of the files in Column A. And then if I have to come back later and
select one file it will add that filename to the end of column A

Can you use the dialog box to select a file location and display that
location in another column?
 
Something like this untested pseudo code:

dim v as Variant
Dim r as Range
v = Application.GetOpenfileName(filefilter:="Excel Files (*.xls),*.xls"
multiselect = True)
set rng = worksheets("Sheet1").Cells(rows.count,1).End(xlup)
if not isempty(rng) then rng = rng.offset(1,0)
rng.Resize(ubound(v)-lbound(v)+1,1).Value = Application.Transpose(v)
 

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