G
Grek
Hi again,
In my excell project, there are 3 sheets in my workbook :
Results
Sheet2
Sheet3
I would like to save only the results' sheet.
At the moment I create a new workbook then I copy/Paste Special Value
the results into it,... but I'm sure there is an easier way to do that
It shoulf be possible to export only the sheet that I want, withou
creating a new workbook, right ?
Here is my code. Could you tell me if it's possible to make it easie
?
Thank you very much in advance,
Greg
Range("G1").Select
Selection.Copy
Range("H1").Select
Selection.PasteSpecial Paste:=xlValues
Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Range("H1").Select
Today = Range("H1").Value
Workbooks.Add
ActiveWorkbook.SaveAs Filename:="c:\myfile" & Today
".xls"
Windows("MyBook.xls").Activate
Sheets("Results").Select
Application.CutCopyMode = False
Sheets("Results").Copy Before:=Workbooks("myfile"
Today & ".xls").Sheets(1)
Sheets("Results").Select
Cells.Copy
Cells.PasteSpecial xlPasteValues
Application.DisplayAlerts = False
Sheets("Sheet1").Select
Application.DisplayAlerts = False
Sheets("Sheet2").Select
ActiveWindow.SelectedSheets.Delete
Sheets("Sheet3").Select
ActiveWindow.SelectedSheets.Delete
Application.DisplayAlerts = True
ActiveWorkbook.Save
ActiveWindow.Clos
In my excell project, there are 3 sheets in my workbook :
Results
Sheet2
Sheet3
I would like to save only the results' sheet.
At the moment I create a new workbook then I copy/Paste Special Value
the results into it,... but I'm sure there is an easier way to do that
It shoulf be possible to export only the sheet that I want, withou
creating a new workbook, right ?
Here is my code. Could you tell me if it's possible to make it easie
?
Thank you very much in advance,
Greg
Range("G1").Select
Selection.Copy
Range("H1").Select
Selection.PasteSpecial Paste:=xlValues
Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Range("H1").Select
Today = Range("H1").Value
Workbooks.Add
ActiveWorkbook.SaveAs Filename:="c:\myfile" & Today
".xls"
Windows("MyBook.xls").Activate
Sheets("Results").Select
Application.CutCopyMode = False
Sheets("Results").Copy Before:=Workbooks("myfile"
Today & ".xls").Sheets(1)
Sheets("Results").Select
Cells.Copy
Cells.PasteSpecial xlPasteValues
Application.DisplayAlerts = False
Sheets("Sheet1").Select
Application.DisplayAlerts = False
Sheets("Sheet2").Select
ActiveWindow.SelectedSheets.Delete
Sheets("Sheet3").Select
ActiveWindow.SelectedSheets.Delete
Application.DisplayAlerts = True
ActiveWorkbook.Save
ActiveWindow.Clos