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

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

Seti

Well-known Member
Joined
May 19, 2002
Messages
2,916
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).
 

santeria

Well-known Member
Joined
Oct 7, 2003
Messages
1,844
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)
 

santeria

Well-known Member
Joined
Oct 7, 2003
Messages
1,844

ADVERTISEMENT

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)
 

santeria

Well-known Member
Joined
Oct 7, 2003
Messages
1,844

ADVERTISEMENT

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

:unsure:
 

Smitty

Legend
Joined
May 15, 2003
Messages
29,536
That's your problem then. You're trying to activate a workbook that's closed. It needs to be open.

Smitty
 

santeria

Well-known Member
Joined
Oct 7, 2003
Messages
1,844
Nope, it's something else.

Can't quite get the correct tags.

Ta


(y)
 

santeria

Well-known Member
Joined
Oct 7, 2003
Messages
1,844
Yes, If someone knows the repair on the Macro Code, I would REALLY appreciate it.

Ta


(y)
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,152,102
Messages
5,768,102
Members
425,454
Latest member
khoro

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
Top