Excel Save to New Workbook

Robertson1995

Board Regular
Joined
Apr 1, 2009
Messages
117
I have a workbook with numerous worksheets. One of the worksheets is named Cisco. I have to populate certain data on this worksheet and the save it to a separate workbook.

I need code that will copy just this worksheet and then save it in a new workbook. I also need the file name for the new workbook to be the text that is in Cell A3 of the existing workbook and have the file menu pop up to give me the option of where to save it to.

Is this possible? Thanks in advance for your help.
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Try this

Code:
Sub SaveCiscoSheet()
    Sheets("Cisco").Copy
    ActiveWorkbook.SaveAs Application.GetSaveAsFilename & ".xls"
End Sub
 
Upvote 0
This works great. thanks. Is there a way to make the file name automatically populate with a certain text instead of "Book1"? I would like it to populate with the text that is in cell A2. Thanks. Im using Excel 2010
 
Upvote 0
Like so

Code:
Sub SaveCiscoSheet()
    Sheets("Cisco").Copy
    ActiveWorkbook.SaveAs Application.GetSaveAsFilename(InitialFileName:=Range("A2")).Value & ".xls"
End Sub
 
Upvote 0
Based on above, which I have working perfectly

I then want to have a macro inserted into the original workbook, that will be copied over the the newly created workbook, and allow you to the new file as a pdf with the same name, NOT that of the original file.
 
Upvote 0

Forum statistics

Threads
1,202,977
Messages
6,052,890
Members
444,608
Latest member
Krunal_Shah

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