I am trying to use Application.GetOpenFilename to search for a several (.jpg) files and list the file paths on a worksheet. I found this on another post that works wonderful if only one file is chosen.
I would like to make multiple file selections and list them in a worksheet row. Can anybody please help?Sub findfile() Dim FLName As String FLName = Application.GetOpenFilename Range("a1").Value = FLName End Sub
Thank you,
Frank
Last edited by Frankf; 02-13-2010 at 02:16 PM. Reason: it is solved
This will keep looping until you Cancel.
Sub ListFile() Dim FLName As String Do FLName = Application.GetOpenFilename If FLName = "False" Then Exit Sub Range("A" & Rows.Count).End(xlUp).Offset(1, 0).Value = FLName Loop End Sub
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
“None of us is as good as all of us” - Ray Kroc
“Actually, I *am* a rocket scientist.” - JB (little ones count!)
Thanks so much for your help. That works like a charm !![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks