kweaver
Well-known Member
- Joined
- May 12, 2009
- Messages
- 2,934
- Office Version
- 365
- 2010
After a bunch of calculations and reformatting, etc., etc., I have a macro that saves a worksheet in a newly created workbook.
I use this code to accomplish the task:
What I want to do once this has been done is bury a macro in this new workbook that upon the user clicking a button will:
1. Delete the sheet named "Sheet1" and
2. On the sheet named "Reformatted" in the new workbook (called sSaveAsFilePath)
a. delete the first row and
b. delete columns E and F
3. Save the Workbook as a CSV file.
I have been messing around with this but can't get it done. Thanks in advance for an approach/solution.
I use this code to accomplish the task:
Code:
Set zNewWB = Workbooks.Add
ThisWorkbook.Sheets("Reformatted").Copy before:=zNewWB.Sheets(1)
zNewWB.SaveAs sSaveAsFilePath
What I want to do once this has been done is bury a macro in this new workbook that upon the user clicking a button will:
1. Delete the sheet named "Sheet1" and
2. On the sheet named "Reformatted" in the new workbook (called sSaveAsFilePath)
a. delete the first row and
b. delete columns E and F
3. Save the Workbook as a CSV file.
I have been messing around with this but can't get it done. Thanks in advance for an approach/solution.