[list image files]

K

Karol_tom

Hello,

I want to create image files list in folder and then, when user choose one
of them show it.

What's wrong with this code ?

Set fso = CreateObject("Scripting.FileSystemObject")
If Not fso.FolderExists(folder) Then
Pattern_TEST.Create_folder_inv.Visible = True
Pattern_TEST.informacja_o_dostawcy = " Folder " & folder & " does not
exist "
Else
Counter = 0
folderek = fso.GetFolder(folder)
For Each pliczek In folderek.Files
If Right(pliczek.Name, 3) = "tif" Then
Pattern_TEST.ListBox1.AddItem pliczek.Name
Counter = Counter + 1
End If

Next pliczek
 

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

Top