Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Saving a worksheet
Currently when the user uses a macro I save a copy of the workbook with the
sheet name imbedded in the workbook name. This is to indicate to me what sheet the user was editing when the macro was run. example below: workbook name saved as Sales 09-2009 (sheet1).xls. Is there a way just to save the sheet they were working on. It would have to be copied as values for this save only so I think I would have to first copy the sheet to a new sheet as values. And then After the saving has completed I would want the new sheet deleted from the workbook. I hope I made myself clear enough on this if not I will give better detail. -- Thank You in Advance Ed Davis |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Saving a worksheet
The macro recorder is your friend. I just recorded this
Sub Macro15() ' ' Macro15 Macro ' Macro recorded 9/27/2009 by Donald B. Guillett ' ' Sheets("Sheet19").Select Sheets("Sheet19").Move Cells.Select Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Range("A1").Select Application.CutCopyMode = False ActiveWorkbook.SaveAs Filename:="C:\personal\mynewbookname.xls", FileFormat _ :=xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:= _ False, CreateBackup:=False End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "Ed Davis" wrote in message ... Currently when the user uses a macro I save a copy of the workbook with the sheet name imbedded in the workbook name. This is to indicate to me what sheet the user was editing when the macro was run. example below: workbook name saved as Sales 09-2009 (sheet1).xls. Is there a way just to save the sheet they were working on. It would have to be copied as values for this save only so I think I would have to first copy the sheet to a new sheet as values. And then After the saving has completed I would want the new sheet deleted from the workbook. I hope I made myself clear enough on this if not I will give better detail. -- Thank You in Advance Ed Davis |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Saving a worksheet
Thank you Don
After making recording it myself and making a few changes it is just what I was looking to do. I did not know that feature was in Excel. Thanks for your help. Ed Davis "Don Guillett" wrote in message ... The macro recorder is your friend. I just recorded this Sub Macro15() ' ' Macro15 Macro ' Macro recorded 9/27/2009 by Donald B. Guillett ' ' Sheets("Sheet19").Select Sheets("Sheet19").Move Cells.Select Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Range("A1").Select Application.CutCopyMode = False ActiveWorkbook.SaveAs Filename:="C:\personal\mynewbookname.xls", FileFormat _ :=xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:= _ False, CreateBackup:=False End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "Ed Davis" wrote in message ... Currently when the user uses a macro I save a copy of the workbook with the sheet name imbedded in the workbook name. This is to indicate to me what sheet the user was editing when the macro was run. example below: workbook name saved as Sales 09-2009 (sheet1).xls. Is there a way just to save the sheet they were working on. It would have to be copied as values for this save only so I think I would have to first copy the sheet to a new sheet as values. And then After the saving has completed I would want the new sheet deleted from the workbook. I hope I made myself clear enough on this if not I will give better detail. -- Thank You in Advance Ed Davis |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Saving in 1 worksheet only | Excel Worksheet Functions | |||
Saving a worksheet | Excel Discussion (Misc queries) | |||
Saving Worksheet | Excel Discussion (Misc queries) | |||
worksheet saving | Excel Discussion (Misc queries) | |||
Saving a Worksheet | Excel Discussion (Misc queries) |