Copy Workbook To New Workbook & Save as in Specific Location, Close Copied Workbook

Status
Not open for further replies.

torourke17

New Member
Joined
Jan 12, 2018
Messages
12
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
I'm working with a code that saves a workbook in a specific location based on what's in a specific cell value. I would like it to copy the workbook, save it in a specific location based on a cell value, and then it will close, leaving me with my Master Workbook.

Here is the code I was working with:

Sub filename_cellvalue()
Dim Path As String
Dim filename As String
Path = "G:\abc\123"
filename = Range("C162")
ActiveWorkbook.SaveAs filename:=Path & filename & ".xlsm", FileFormat:=52
End Sub
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
@torourke17 this is a duplicate, of this post https://www.mrexcel.com/forum/excel...kbook-save-specific-location.html#post4986096

Please do not post the same question multiple times. All clarifications, follow-ups, and bumps should be posted back to the original thread.
Per forum rules, posts of a duplicate nature will be locked or deleted (rule 12 here: Forum Rules).

If you do not receive a response, you can "bump" it by replying to it again, though we advise you to wait 24 hours before doing and not to bump a thread more than once a day.
 
Last edited:
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,213,546
Messages
6,114,253
Members
448,556
Latest member
peterhess2002

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