ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Macro to Save just one sheet to new workbook. (https://www.excelbanter.com/excel-worksheet-functions/217990-macro-save-just-one-sheet-new-workbook.html)

Guy[_2_]

Macro to Save just one sheet to new workbook.
 
I need a macro that when selected will copy the currently displayed sheet of
a workbook to a new workbook *(with only the values, no macros or formulas),
and then, if possible, to also automatically bring up the 'Save As' window
with the current date as the name, formatted as (mm-dd-yy).

Thanks ya'll,
Guy


joel

Macro to Save just one sheet to new workbook.
 
ActiveSheet.Copy
Set newbk = ActiveWorkbook
newbk.ActiveSheet.Cells.Copy
newbk.ActiveSheet.Cells.PasteSpecial Paste:=xlPasteValues

InitialName = Format(Date, "mm-dd-yy") & ".xls"
FName = Application.GetSaveAsFilename(InitialFileName:=Ini tialName, _
fileFilter:="Excel Files (*.xls), *.xls")
newbk.SaveAs Filename:=FName

"Guy" wrote:

I need a macro that when selected will copy the currently displayed sheet of
a workbook to a new workbook *(with only the values, no macros or formulas),
and then, if possible, to also automatically bring up the 'Save As' window
with the current date as the name, formatted as (mm-dd-yy).

Thanks ya'll,
Guy


Guy[_2_]

Macro to Save just one sheet to new workbook.
 
That is perfect!
Thanks a bunch,
Guy

"Joel" wrote:

ActiveSheet.Copy
Set newbk = ActiveWorkbook
newbk.ActiveSheet.Cells.Copy
newbk.ActiveSheet.Cells.PasteSpecial Paste:=xlPasteValues

InitialName = Format(Date, "mm-dd-yy") & ".xls"
FName = Application.GetSaveAsFilename(InitialFileName:=Ini tialName, _
fileFilter:="Excel Files (*.xls), *.xls")
newbk.SaveAs Filename:=FName

"Guy" wrote:

I need a macro that when selected will copy the currently displayed sheet of
a workbook to a new workbook *(with only the values, no macros or formulas),
and then, if possible, to also automatically bring up the 'Save As' window
with the current date as the name, formatted as (mm-dd-yy).

Thanks ya'll,
Guy



All times are GMT +1. The time now is 02:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com