Save to specified drive, folder

Markkens

Board Regular
Joined
Mar 4, 2003
Messages
197
I'm using a cell contents to generate a save-as filename, but am stuck on getting a drive & folder destination going for this...

Please help!
Thanks!

Z:\TLA\

Sub Save_TLA()
ActiveWorkbook.SaveAs Filename:= _
Worksheets("ID and cust info").Range("b42").Text & ".xls", FileFormat _
:=xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:= _
False, CreateBackup:=False
End Sub
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
So what's in the cell and what/where do you want to save the file as?
 
Upvote 0
You probably need to specify the directory to store:

Code:
Sub Save_TLA()
ChDir "Z:\TLA"
ActiveWorkbook.SaveAs Filename:= _ 
Worksheets("ID and cust info").Range("b42").Text & ".xls", FileFormat _ 
:=xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:= _ 
False, CreateBackup:=False 
End Sub
 
Upvote 0
Got it. I just added the drive and path as part of the cell contents to read as a filename, giving the save a full path and filename.

Thanks!
 
Upvote 0

Forum statistics

Threads
1,214,829
Messages
6,121,827
Members
449,051
Latest member
excelquestion515

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