Y
yanto
Hi,
I got this error ("Invalid Procedure Call or Arguments") when run this
code:
'Delete drawing files
Set fs = CreateObject("Scripting.FileSystemObject")
Set fld = fs.GetFolder(pubWorkingDir & "Drawings\")
Set rsc = dbs.OpenRecordset("SELECT * FROM tblDrawings WHERE ID=" &
tempItemID, dbOpenDynaset)
rsc.MoveFirst
Do While Not rsc.EOF
If Dir(pubWorkingDir & "Drawings\" & rsc!DrawingFile) <> "" Then
fld.Files(pubWorkingDir & "Drawings\" & rsc!
DrawingFile).Delete True '(the error caused by this line)
End If
rsc.MoveNext
Loop
rsc.Close
Set rsc = Nothing
Set fld = Nothing
Set fs = Nothing
and the programm stop at this line " fld.Files(pubWorkingDir &
"Drawings\" & rsc!DrawingFile).Delete True " and the error come
out .
Do I miss somthing?
Thanks for any help
Yanto
I got this error ("Invalid Procedure Call or Arguments") when run this
code:
'Delete drawing files
Set fs = CreateObject("Scripting.FileSystemObject")
Set fld = fs.GetFolder(pubWorkingDir & "Drawings\")
Set rsc = dbs.OpenRecordset("SELECT * FROM tblDrawings WHERE ID=" &
tempItemID, dbOpenDynaset)
rsc.MoveFirst
Do While Not rsc.EOF
If Dir(pubWorkingDir & "Drawings\" & rsc!DrawingFile) <> "" Then
fld.Files(pubWorkingDir & "Drawings\" & rsc!
DrawingFile).Delete True '(the error caused by this line)
End If
rsc.MoveNext
Loop
rsc.Close
Set rsc = Nothing
Set fld = Nothing
Set fs = Nothing
and the programm stop at this line " fld.Files(pubWorkingDir &
"Drawings\" & rsc!DrawingFile).Delete True " and the error come
out .
Do I miss somthing?
Thanks for any help
Yanto