Save file to Network Drive

santeria

Well-known Member
Joined
Oct 7, 2003
Messages
1,844
I'm just trying to Figure out what to change for a network file save.
Probably something amazingly basic...

However, I have...

Code:
Sub SAVECMSDAILYNETWORK()
'
' SAVECMSDAILYNETWORK Macro
' Macro recorded 2/24/2004 
'

'
    Windows("M:\REPORTS\02_FEBRUARY SUMMARY\CMS Daily.xls").Activate
    ChDir "E:\HR Outsourcing\Benefits\Reports"
    ActiveWorkbook.SaveAs Filename:= _
        "E:\HR Outsourcing\Benefits\Reports\CMS Daily2.xls", FileFormat:=xlNormal, _
        Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
        CreateBackup:=False
    ActiveWorkbook.Close
End Sub

And I need to know what to change to make the thing work.

Ta

(y)
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Not 100% sure, but I think the space in the file name is a problem. Can you use an underscore? If not, I think you need some single quotes around the filename (and possibly the extension).
 
Upvote 0
Actually the file references is the one thing I am certain on.
They work in all other code I have in that format.

It's the references to the file that I am stumped on... the macro is aiming to save a file from a separate file.
The "Raw Data File" is basically where the control panel for this stuff lives.
And I need to save the CMS Daily file as CMS Daily2 in another Network drive.

Such a headache, but the instructions I have stand as is :)

Thanks anyway.

Ta

(y)
 
Upvote 0
First Line.
However, this was the code generated by the Macro Recorder, so it has me puzzled as to why it is dying.


Ta

(y)
 
Upvote 0
No.
Most of the other Macros seem to run without it being open.
In fact they usually have seizures if it is open.

:unsure:
 
Upvote 0
That's your problem then. You're trying to activate a workbook that's closed. It needs to be open.

Smitty
 
Upvote 0
Yes, If someone knows the repair on the Macro Code, I would REALLY appreciate it.

Ta


(y)
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,750
Members
448,989
Latest member
mariah3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top