Hi Les,
I have just noticed that my last post was
in Italian; please accept my apologies and
ignore that post.
I had been responding in the Italian NG
and, when I came to post a follow up
response to you, I somehow managed to
forget *which* NG I was in!
So, putting my brain into gear, let me start
afresh!
I have now had the opportunity to test the
code on files in a network location and the
code worked as anticipated. If you look at
Ron de Bruin's reply to me, you will se that,
similarly, he had no problems with a
network location.
I am, therefore, ineluctably drawn to
conclude that one, or more, of the files
does not contain a sheet named "Sheet1".
In order to try to identify the problem, try
substituting
Res = GetValue(sPath, sName, sSheet, sCell)
with
Debug.Print .Name
Res = GetValue(sPath, sName, sSheet, sCell)
MsgBox .Name
When an error is encountered , open the
last file listed in the Intermediate window;
check that there really is a sheet named
"Sheet1" without leading or trailing spaces,
and that its A1 cell contains a valid file name
(without an extension).
If *any* MsgBox message is passed, we
can be sure that the code is able to access
at least some files in the network location.
If however, the first problematic file is named
"Sheet1", I shall have to don my thinking cap
once more!
Aplogies once again for losing track of where
I was!