Giordano Bruno
Well-known Member
- Joined
- Jan 7, 2007
- Messages
- 1,345
In my code I have the following two lines:
Sheets("PersStore").Range("A2:A84").Copy
Sheets("PersStore").Range(Cells(2, 1), Cells(84, 1)).Copy
The code breaks at the second line with the message "Run-time error 1004 Application-defined or object-defined error"
The second line runs if I first make PersStore the active worksheet. I want to use the second line, but I don't want to have to activate the other worksheet. Can anyone point me in the right direction?
Sheets("PersStore").Range("A2:A84").Copy
Sheets("PersStore").Range(Cells(2, 1), Cells(84, 1)).Copy
The code breaks at the second line with the message "Run-time error 1004 Application-defined or object-defined error"
The second line runs if I first make PersStore the active worksheet. I want to use the second line, but I don't want to have to activate the other worksheet. Can anyone point me in the right direction?