Need to Save As with VB

Status
Not open for further replies.

Pauljj

Well-known Member
Joined
Mar 28, 2004
Messages
2,047
In a veiled effort to see if there is any luck with this I am posting again, I have checked to make sure I am not breaking the rules and all seems to be ok. I attach the previous post URL below

http://www.mrexcel.com/forum/showthread.php?t=571361



I want this macro to save my activeworkbook in a different location, adding todays date to it
and I have done the following

Sub Saves()

Dim wbo As Workbook
Dim mydate As Date

Set wbo = ActiveWorkbook

mydate = Format(Date, "dd-mmm-yy")

fn = "Report 3 Template " & mydate & ".xls"

fp = "\\Tfcluster-vol1\vol1\DEPART\GROUND\123 FILES\6. RESERVATIONS - Outstanding requests\2.Saved 03 Reports Files\"

wbo.SaveAs Filename:=fp & fn

wbo.Close savechanges:=False


End Sub



It errors at the point which says "wbo.SaveAs Filename:=fp & fn"

because it says the file name does not exist (well it shouldn't) or because the file is in use by another program.....very unlikely ?!!?

Can anyone see any problems with what I have written please

Regards
Paul
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Status
Not open for further replies.

Forum statistics

Threads
1,224,603
Messages
6,179,850
Members
452,948
Latest member
UsmanAli786

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