Name of files in a folder

  • Thread starter Thread starter Irfan Khan
  • Start date Start date
I

Irfan Khan

Hi Experts,

How can I get name of all the files exist in one folder through VBA ???


Cheers !!!
 
A simple Dir loop does it

Dim filename As String

filename = Dir("C:\test\*.xls")
Do While filename <> ""

Debug.Print filename
filename = Dir()
Loop
 

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