View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
mark mark is offline
external usenet poster
 
Posts: 196
Default Folder and filenames?

Thanks for the reply, I might be able to use some of this
regards
mark
-----Original Message-----
in addition to Bob's code..


These will bring up standard dialogs for opening and

browsing files.
see VBA help for details


office.FileDialog
excel.GetOpenfileName

Private Sub Test()
Dim xlapp As Object
Set xlapp = GetObject(, "excel.application")
xlapp.dialogs(475).Show
'475 = xlDialogFileFind
End Sub


keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Mark" wrote:

I want to list (from a known directory eg:

E:\Customers)
the folder names (that branch off the Customers folder)
into sheet1 and filenames in each folder into sheet2.

Can
this be done with VBA or do I need to resort to an API
call?
If anyone knows or has an idea, let me know here and at

my
email:


Alternatively,
In vb6 there is a control that lists all the files in a
given directory, in a listbox. Is there a similar

control
in excel?

Could I use this control in excel? I've got it but

haven't
tried it yet.

regards
Mark



.