Thanks for the help Bob.
There are 7 places in the code where I use DIR to check for the existance of
a folder. I tried your dir$("nul") in all 7 places but it didn't help to
release the folder.
Below is one of the 7 location were I use DIR. I tried dir$("nul") as a
function [gS = Dir$("null")] and as a Sub [dir$ "nul"] but neither worked.
sLastCopyFolder = GetSetting("BBH", "DrawingAccess",
"LastCopyFolder", _
"C:\Documents and Settings\" & Environ("username") & "\My
Documents")
If Dir(sLastCopyFolder, vbDirectory) = "" Then
sFile = sNewestFileInFolder("C:\Documents and Settings\" &
Environ("username") & _
"\My Documents", "*.skv")
Else
gS = Dir$("null")
sFile = sNewestFileInFolder(sLastCopyFolder, "*.skv")
End If
Post by Bob ButlerPost by MABAn add-in created folder (MkDir) cannot be deleted unless the
application utilizing the add-in is closed.
Any thoughts?
Sounds like the add-in, or the application using it, has the folder open.
If, for example, the add-in uses Dir$ to check the folder it could easily
have it open. In that case using Dir$("nul") should release it. If the
application has been used to browse to the folder then you may need to
browse to another folder. Since you didn't specify the application or
anything about the sequence of events to allow anybody to try to replicate
the probelm it's all just conjecture though. I suspect that's what Karl was
alluding to even if he might have been a tad more diplomatic <g>.
--
Reply to the group so all can participate
VB.Net: "Fool me once..."