Run-Time Error '1004'
i'm confused......... you said yourself that the laptop is drive c:,
and it works fine, because your code is specifying drive c: in the
path. the computer is networked drive h: and it doesn't work, BECAUSE
YOUR CODE SPECIFIES DRIVE C:.
seems perfectly obvious to me...................
if excel.version = XXXX (whatever version is on the laptop), use a
path starting with c:
elseif excel.version = XXXX (whatever version is on the computer), use
a path starting with h:
end if
hope that helps
:)
susan
On Mar 27, 1:12*pm, "mcbarker" wrote:
The macro shown below works perfectly on my laptop using Excel 2000 (used
for writing and testing macros before placing them on the network). When I
transfer it over to the computer that it's actually going to be used on,
which uses Excel 2003, the macro stops dead at the following line:
Workbooks.Open Filename:="C:\Quality Assurance\Chemistry History\Monthly
Template.xls"
The error looks like this:
Run-Time error '1004'
'filename' could not be found. Check the spelling of the filename, and
verify that the file location is correct.
If you are trying to open the file from your list of recently used files on
the file menu, make sure that the file has not been renamed, moved, or
deleted.
The only difference between the two computer systems (apart from the Excel
versions) is that the drive designation on the networked computer is H:
instead of C:. All C: references are changed to H: on the working computer.
|