Hi peeps.

Ca anyone see what I'm doing wrong here

vbCode Code:
  1. Dim Extra As String
  2. Dim oFS As FileSystemObject
  3. Dim oFolder As Folder
  4. Dim oFile As File
  5. Extra = DwgsPath & "\"
  6. DWFileCount = 0
  7.  
  8. Set oFS = New FileSystemObject
  9. Set oFolder = oFS.GetFolder(Extra)
  10. For Each oFile In oFolder.Files
  11.    List1.AddItem oFile.Name
  12.  Label1.Visible = True
  13.  DWFileCount = DWFileCount + 1  'COUNT NUMBER OF FILES
  14. Next oFile
  15. Set oFolder = Nothing
  16. Set oFS = Nothing
  17. Text2.Text = Text2.Text & "Identifying Dwg files.........Completed" & vbNewLine & DWFileCount & vbNewLine

"For Each oFile In oFolder.Files" is the bit that is highlighted as being he error.

your comments would be appreciated.