Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
creating new workbook macro
Hi, I've looked for this but can't find it exactly.
I need a macro to : copy 7 specific sheets from one workbook (not the whole book) to a new book ask the user for a name save the new book as that name Thanks in advance -- Linda M |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
creating new workbook macro
Worksheets(Array("Sheet1", "Sheet2","Sheet3", "Sheet4","Sheet5","Sheet6","Sheet7")).Copy ans = inputbox("Name the new workbook" activeworkbook.SaveAs Filename:= "C:\myDir\" & ans & ".xls" -- HTH Bob Phillips "LindaM" wrote in message ... Hi, I've looked for this but can't find it exactly. I need a macro to : copy 7 specific sheets from one workbook (not the whole book) to a new book ask the user for a name save the new book as that name Thanks in advance -- Linda M |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
creating new workbook macro
Thank you very much, Bob. Just what I wanted
-- Linda M "Bob Phillips" wrote: Worksheets(Array("Sheet1", "Sheet2","Sheet3", "Sheet4","Sheet5","Sheet6","Sheet7")).Copy ans = inputbox("Name the new workbook" activeworkbook.SaveAs Filename:= "C:\myDir\" & ans & ".xls" -- HTH Bob Phillips "LindaM" wrote in message ... Hi, I've looked for this but can't find it exactly. I need a macro to : copy 7 specific sheets from one workbook (not the whole book) to a new book ask the user for a name save the new book as that name Thanks in advance -- Linda M |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
creating new workbook macro
Bob:
Is there a Isgrouped property, or the like that you could "Group the sheets (using either shift or control keys) to Copy? My google search didn't turn up anything. TIA, Jim "Bob Phillips" wrote in message ... Worksheets(Array("Sheet1", "Sheet2","Sheet3", "Sheet4","Sheet5","Sheet6","Sheet7")).Copy ans = inputbox("Name the new workbook" activeworkbook.SaveAs Filename:= "C:\myDir\" & ans & ".xls" -- HTH Bob Phillips "LindaM" wrote in message ... Hi, I've looked for this but can't find it exactly. I need a macro to : copy 7 specific sheets from one workbook (not the whole book) to a new book ask the user for a name save the new book as that name Thanks in advance -- Linda M |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
creating new workbook macro
"Bob Phillips" wrote in message ... Worksheets(Array("Sheet1", "Sheet2","Sheet3", "Sheet4","Sheet5","Sheet6","Sheet7")).Copy ans = inputbox("Name the new workbook" activeworkbook.SaveAs Filename:= "C:\myDir\" & ans & ".xls" -- HTH Bob Phillips "LindaM" wrote in message ... Hi, I've looked for this but can't find it exactly. I need a macro to : copy 7 specific sheets from one workbook (not the whole book) to a new book ask the user for a name save the new book as that name Thanks in advance -- Linda M Thanks!! Had resorted to repeatedly calling a sub-subroutine to process a subgroup of sheets until encountering your much more elegant, logical, and faster "With Worksheets(array(...))...End With" solution. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
saving macro from workbook to Personal Macro Workbook | Excel Discussion (Misc queries) | |||
Creating a workbook | Excel Discussion (Misc queries) | |||
Creating a drop box in a workbook. | Excel Discussion (Misc queries) | |||
Creating a log in a workbook | Excel Discussion (Misc queries) | |||
Creating a new workbook. | Excel Programming |