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

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
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,391
Messages
6,119,247
Members
448,879
Latest member
oksanana

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