View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Path not found error

I like to check this way:

dim testStr as string

teststr = ""
on error resume next
teststr=dir("MyPath\MyDB.mdb")
on error goto 0

if teststr = "" then
'not found
else
'found
end if



EAB1977 wrote:

I am hoping that someome here can help me out with a problem I am
having.

We distribute our Excel sheets across the nation via a Lotus Notes
database document. In the Excel sheets, when launched, I have some code
to see if a directory exists on the Workbook_Open and the
Workbook_BeforeClose events:

If Len(Dir("MyPath\MyDB.mdb")) = 0 Then Exit Sub

On my server it works as intended.

When the user at another plant opens the document on a different
server, they get a Path Not Found error. The plants other than out
Corporate facility shouldn't have access to this. Why is this? Is there
a solution?


--

Dave Peterson