Macro to Save just one sheet to new workbook.

G

Guy

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
 
J

Joel

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:=InitialName, _
fileFilter:="Excel Files (*.xls), *.xls")
newbk.SaveAs Filename:=FName
 
G

Guy

That is perfect!
Thanks a bunch,
Guy

Joel said:
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:=InitialName, _
fileFilter:="Excel Files (*.xls), *.xls")
newbk.SaveAs Filename:=FName
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top