LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
 
Posts: n/a
Default retrieve filenames from given directory into excel


CLR wrote:
I use Jim Cone's fine Add-in called "ListFiles" for this sort of thing.
It's available for free at.........

http://www.realezsites.com/bus/primi...e/products.php

Vaya con Dios,
Chuck, CABGx3


wrote in message
oups.com...
Hello,

I'm trying to retrive files from a given directory into excel.

I already have this file from another posted message:

Sub GetFileNames()
Dim F As Long
Dim FileName As String
Dim TheNames As Variant


ReDim TheNames(1 To 1)
FileName = Dir$("*.*")


Do While Len(FileName)
F = F + 1
ReDim Preserve TheNames(1 To F)
TheNames(F) = FileName
FileName = Dir$()
Loop


Cells(1, 1).Resize(F, 1).Value = Application.Transpose(TheNames)
End Sub

But I want to be able to set the path myself

thanks

Many thanks chuck

But I need this as a part of another "sub" so I'm looking for code

Regards,

Giel

 
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
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
How do I retrieve changes to an unsaved excel document Jim Excel Discussion (Misc queries) 4 July 11th 08 11:02 PM
Retrieve data from separate Excel session JessK Charts and Charting in Excel 2 March 27th 06 01:34 AM
How do I retrieve changes to an unsaved excel document Jim New Users to Excel 1 March 24th 06 01:56 AM
Default Save To directory doesn't work Excel 2003 [email protected] Excel Discussion (Misc queries) 1 March 20th 06 11:44 PM


All times are GMT +1. The time now is 08:51 AM.

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

About Us

"It's about Microsoft Excel"