Save Workbook to specific location and copy it as a new workbook

xytle

New Member
Joined
Apr 8, 2012
Messages
6
Hi,

I'm still new to VBA and can't figure this one out. I work with txt files that I open with Excel (2010 on Windows). I need to accomplish the following steps:

1. Save the workbook as xlsx file, to the same location where the txt file currently was. No name change is needed, just the file type.
2. Copy the workbook as a new workbook and close the original one.
(On the copy, I'm running a short macro that renames columns. I already have that macro, just need to insert it at this point).
3. After that little macro, I need to save this new workbook as a txt file with a specific name: "OrangeLabels" to a folder named "VendorLabels" on my Desktop.

Hope someone can help me with this little puzzle.

Thanks!
 

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.

Forum statistics

Threads
1,215,731
Messages
6,126,537
Members
449,316
Latest member
sravya

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