I'm trying to copy a worksheet from workbook into another using Worksheets.Copy function. However, this seem to be working in only some of the files and for others I get "Unable to get the Copy property of the Worksheet class" error message. I've tried to copy/move worksheets manually from other workbooks. Also, tried unprotecting/protecting workbook and worksheets but none seem to be working. I'm using Microsoft Office 2010. Is there an Excel feature that enables/disables copying worksheets form other workbooks?
Asked
Active
Viewed 2,680 times
4
-
Did you ever find a solution? – IngoB Nov 06 '19 at 12:52
-
No, but there's manual workaround. – DataPispor Dec 05 '19 at 13:53
3 Answers
1
In case someone stumbles upon this in the future, my issue was that the worksheet I was trying to copy was set to 'xlSheetVeryHidden'. To overcome this issue, I temporarily made the sheet visible and made it hidden again straight after the Copy call.
templateWorksheet.Visible = xlSheetVisible
Call templateWorksheet.Copy
templateWorksheet.Visible = xlSheetVeryHidden

Kacper Jarzymowski
- 11
- 1
0
In my case the issue was that I had not been working with the worksheet but the workbook. Make sure you are using the worksheet and not the book.

map829
- 1
- 1
-1
In my case, the Excel file was not enabled for editing. Once I did that, it worked.

Jyoti
- 17
- 1
- 1
- 2