FileCopy() worked fine, so I figured that the problem was with a DJImport object I was using which was the source of the FileRename() object. The DJImport was in a subprocess and appartently wasn't being freed when the subprocess finished. I set the DJImport object to "Nothing" in the end step and the problem went away.
In RIFL, the correct way to handle a DJImport object used throughout a subprocess is
' in Process Variables
' imp As DJImport
' in the start step
Set imp = New DJImport "Excel XP"
' in the end step
Set imp = Nothing
This post is replicated from http://my.opera.com/walkerca/blog/2010/12/18/solving-a-file-access-mode-error.
No comments:
Post a Comment