Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Tom,
this one didn't work. But I used the other one, which you've posted before This one works very well... Thanks, Stephan Tom Ogilvy schrieb: As long as there will be at least two adjacent cells with sheet names: Sub Copysheets1() Dim varr As Variant Dim rng As Range Set rng = Range(Cells(1, 1), Cells(1, 1).End(xlDown)) varr = Application.Transpose(rng) Debug.Print LBound(varr, 1), UBound(varr, 1) Sheets(varr).Copy End Sub -- Regards, Tom Ogilvy "Stephan Otto" wrote in message ... Tom Ogilvy schrieb: How do you decide which sheets By reading a specific column. All sheets, that are mentioned in that column, should be copied... Variant does work Sub copysheets() Dim list As Variant ReDim list(0 To 2) list(0) = "Sheet1" list(1) = "Sheet2" list(2) = "Sheet3" Sheets(list).Copy End Sub worked fine for me. (also, no need to select them first). Thanks, I will try it this evening. This computer runs Linux... -- -- http://www.reparco.com - Die kostenlose, persönliche Startseite -- -- http://www.reparco.com - Die kostenlose, persönliche Startseite |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
copy all sheets to a new workbook | Setting up and Configuration of Excel | |||
Copy several sheets from one workbook into another at the same tim | Excel Discussion (Misc queries) | |||
selecting a single sheet from a volume of sheets in a workbook | Excel Worksheet Functions | |||
copy workbook sheets? | Setting up and Configuration of Excel | |||
copy a workbook from other workbook with lot of sheets wit... | Excel Discussion (Misc queries) |