Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Select File names and select a location of file

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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Select File names and select a location of file

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)

--
Regards,
Tom Ogilvy


"pokdbz" wrote:

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?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Code for Select a file and save it in a different location Oggy Excel Programming 2 April 22nd 07 03:58 PM
select database file path location for excel query GerryE Excel Programming 3 July 12th 06 01:23 AM
Prompt user to select file with default file selected dialog Bruce Cooley Excel Programming 0 September 15th 03 06:43 AM
Prompt user to select file with default file selected dialog Bob Phillips[_5_] Excel Programming 0 September 14th 03 09:22 PM
Prompt user to select file with default file selected dialog Bob Phillips[_5_] Excel Programming 0 September 14th 03 09:19 PM


All times are GMT +1. The time now is 02:49 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"