Sash98
asked on
How to close a TIFF file using VBA
I have a program where I display a list of TIFF files on a form. The user clicks one, it opens, they select several things on the form that creates a new name\location for the file. I copy the file to a new location with the new name.
Now I just need to close and kill the file that was just copied. Everything is working perfectly and this seems so simple. I know the full file name and just want to close and kill it. Ironically, when I run the same application in Citrix, KILL and the filename works. It doesn't matter that it's open. Any assistance would be greatly appreciated!
Now I just need to close and kill the file that was just copied. Everything is working perfectly and this seems so simple. I know the full file name and just want to close and kill it. Ironically, when I run the same application in Citrix, KILL and the filename works. It doesn't matter that it's open. Any assistance would be greatly appreciated!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Alomost always file operations do not release the file instantly. One bad... but effective way is to wait for sometime and then try killing it.
Following is a code that tries for 10 seconds.
Open in new window