[RESOLVED] Type mismatch error
Hi peeps.
Ca anyone see what I'm doing wrong here :confused:
vbCode Code:
Dim Extra As String
Dim oFS As FileSystemObject
Dim oFolder As Folder
Dim oFile As File
Extra = DwgsPath & "\"
DWFileCount = 0
Set oFS = New FileSystemObject
Set oFolder = oFS.GetFolder(Extra)
For Each oFile In oFolder.Files
List1.AddItem oFile.Name
Label1.Visible = True
DWFileCount = DWFileCount + 1 'COUNT NUMBER OF FILES
Next oFile
Set oFolder = Nothing
Set oFS = Nothing
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. :thumb:
:cool:
Re: [RESOLVED] Type mismatch error
Mmm.... yes it certainly is, and I've put it in and it works a treat..:D
Cant thank you peeps enough...:wave:
All the best see you soon (no doubt) lol