Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Duplicate all Macros?
This is part of a macro that duplicates sheets into a new workbook and lets
me save them someplace else... only problem, it leaves behind all macros.... how do I take all macros from the original workbook and duplicate them into the new workbook? thanks a lot! Sheets(Array("Sheet1", "Sheet2", "Sheet3", "Sheet4", "Sheet5", "Sheet6")).Select Sheets("Sheet5").Activate Sheets(Array("Sheet1", "Sheet2", "Sheet3", "Sheet4", "Sheet5", "Sheet6")).Copy Range("A34").Select Selection.Copy Application.CutCopyMode = False ChDir " U:\Folder1\Folder2\Folder3" Application.Dialogs(xlDialogSaveAs).Show "U:\Folder1\Folder2\Folder3" |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Duplicate all Macros?
Steve,
What don't you Save As to a new workbook and then delete the sheets you don't want in that workbook? SteveM SteveC wrote: This is part of a macro that duplicates sheets into a new workbook and lets me save them someplace else... only problem, it leaves behind all macros.... how do I take all macros from the original workbook and duplicate them into the new workbook? thanks a lot! Sheets(Array("Sheet1", "Sheet2", "Sheet3", "Sheet4", "Sheet5", "Sheet6")).Select Sheets("Sheet5").Activate Sheets(Array("Sheet1", "Sheet2", "Sheet3", "Sheet4", "Sheet5", "Sheet6")).Copy Range("A34").Select Selection.Copy Application.CutCopyMode = False ChDir " U:\Folder1\Folder2\Folder3" Application.Dialogs(xlDialogSaveAs).Show "U:\Folder1\Folder2\Folder3" |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Duplicate all Macros?
I wanted to avoid that because all these sheets come from one large workbook,
and the macro pulls out only the sheets I need -- this is faster than doing multiple Save As commands... but i will try to come up with a way to do this... thanks for the suggestion... "SteveM" wrote: Steve, What don't you Save As to a new workbook and then delete the sheets you don't want in that workbook? SteveM SteveC wrote: This is part of a macro that duplicates sheets into a new workbook and lets me save them someplace else... only problem, it leaves behind all macros.... how do I take all macros from the original workbook and duplicate them into the new workbook? thanks a lot! Sheets(Array("Sheet1", "Sheet2", "Sheet3", "Sheet4", "Sheet5", "Sheet6")).Select Sheets("Sheet5").Activate Sheets(Array("Sheet1", "Sheet2", "Sheet3", "Sheet4", "Sheet5", "Sheet6")).Copy Range("A34").Select Selection.Copy Application.CutCopyMode = False ChDir " U:\Folder1\Folder2\Folder3" Application.Dialogs(xlDialogSaveAs).Show "U:\Folder1\Folder2\Folder3" |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Good at Macros? I'm Trying to find duplicate entries. | Excel Discussion (Misc queries) | |||
How do you delete duplicate addresses, but keep duplicate names? | Excel Discussion (Misc queries) | |||
Duplicate CommandButton macros | Excel Programming | |||
weird saving of a document with macros resulting with macros being transfered to the copy | Excel Programming | |||
Macros not appearing in the Tools Macro Macros list | Excel Programming |