I am in a work system with a server that serves 4 different locations, 1 onshore and 3 offshore facilities. Generally the shared folder is mapped to show as I drive, however on some PCs offshore it may be J or K drive.
I have an excel workbook that has a macro which will lock non-blank cells and protect itself then do a save as to a different folder.
Onshore the shared folder on the server is I:\ however offshore it can be J\: or K:\ depending on how the individual PCs have been mapped.
I have tried to ammend the code removing I; and replacing it with the server mlbdat02\shared however this gives me an error message
The origional code, which works perfectly, is:-
strFileName = "I:\organization\T&D-All\ePTW Course Scheduling\ePTW Schedule Master\ePTW Schedule Master R1" & Chr(32) & Format(Date, "d mmm yyyy") & ".xls"
The revised code which causes the error is:-
strFileName = "mlbdat02\shared\organization\T&D-All\ePTW Course Scheduling\ePTW Schedule Master\ePTW Schedule Master R1" & Chr(32) & Format(Date, "d mmm yyyy") & ".xls"
The error message I get is:-
Run-time error '1004'
Microsoft Office Excel cannot access the file
'I:\organisation\T&D-All\ePTW Course\ePTW Course Scheduling\ePTW Course Master\mldat02\shared\T&D-All\ePTW Course\ePTW Course Scheduling\ePTW Course Master.
Not being very good in VBasic How can I fix the error without reverting to I:\
I have an excel workbook that has a macro which will lock non-blank cells and protect itself then do a save as to a different folder.
Onshore the shared folder on the server is I:\ however offshore it can be J\: or K:\ depending on how the individual PCs have been mapped.
I have tried to ammend the code removing I; and replacing it with the server mlbdat02\shared however this gives me an error message
The origional code, which works perfectly, is:-
strFileName = "I:\organization\T&D-All\ePTW Course Scheduling\ePTW Schedule Master\ePTW Schedule Master R1" & Chr(32) & Format(Date, "d mmm yyyy") & ".xls"
The revised code which causes the error is:-
strFileName = "mlbdat02\shared\organization\T&D-All\ePTW Course Scheduling\ePTW Schedule Master\ePTW Schedule Master R1" & Chr(32) & Format(Date, "d mmm yyyy") & ".xls"
The error message I get is:-
Run-time error '1004'
Microsoft Office Excel cannot access the file
'I:\organisation\T&D-All\ePTW Course\ePTW Course Scheduling\ePTW Course Master\mldat02\shared\T&D-All\ePTW Course\ePTW Course Scheduling\ePTW Course Master.
Not being very good in VBasic How can I fix the error without reverting to I:\