![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Mar 2002
Posts: 1,290
|
I have a macro that makes a filter on a current sheet and afterthen this copied to another workbook.
So only that sheet is copied. In my macro id the following code: Sub Filter() currentworkbook = ActiveWorkbook.Name currentsheet = ActiveSheet.Name Is it possible to add a second sheet or is this only possible with the current sheet? What I want to do is after the filter adding a second sheet to copy to that other workbook Many thanks. |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
Use an array...
Sheets(Array("Sheet1", "Sheet2")).Copy Replace Sheet1 and Sheet2 with the names you wish to copy to a new book... Tom |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|