View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
OMAR OMAR is offline
external usenet poster
 
Posts: 25
Default Help with file search / Dir()

I need some help with the following code:

'
Dim myCount As Long
'
'
If (Lbx_file_names.Value < "") Then
'
Adobe_Filename_Pick = Lbx_file_names.Value
'
End If
'
Lbx_file_names.Clear
MyFolder = "X:\Omar\Finished_Flanges\"
'
'myFile = Dir(myFolder & "*.pdf")
MyFile = Dir(MyFolder & Flange_sname & ".pdf")
'
myCount = 0
If MyFile < "" Then
Do
myCount = myCount + 1
Lbx_file_names.AddItem MyFile
'
MyFile = Dir()
Loop While MyFile < ""
End If
'

I want to search the directory X:\Omar\Finished_Flanges\ and all of its
subdirectories. I think i can do it with filesearch but am not sure. Please
offer some suggestions.

Thanks,
Omar