ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copying hidden pages (https://www.excelbanter.com/excel-programming/317481-copying-hidden-pages.html)

el_peacock

Copying hidden pages
 
Hi
I have a workbook with hidden and unhidden worksheets. I have a macro
button on sheet 1 with the following code:

Private Sub CommandButton2_Click()
Sheets(Array("Sheet2", "Sheet3", "Sheet4", _
"Sheet5", "Sheet6", "Sheet7", "Sheet8", _
"Sheet9")).Copy
End Sub

This copies all sheets to a new workbook and works fine on my pc at
homerunning excel 2000. However, I transferred it to my workbook on my pc at
work, running excel 97 and I get a runtime error - it won't copy the unhidden
sheets. Is this a shortfall of xl97? if so is there any way of copying
hidden sheets in this manner??

--
Thanks!
---------
Gareth


All times are GMT +1. The time now is 11:01 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com