Fayebaline
New Member
- Joined
- Aug 23, 2017
- Messages
- 3
Hello
New here and wondered if I could have some help please?
I have just upgraded to 2016 and have come across an issue with some vba that has previously been working fine. I am at a dead end as to why it is no longer working, if someone could shed some light I shall be eternally grateful
So, the VBA is copying data from one worksheet and then pasting it into another, without selecting the second sheet, then it copies some other data and does the same.
The issue is that it has started activating the 2nd sheet and then the rest of the macro runs on the wrong sheet! The bizarre thing about it is that the first copy/paste works but the second doesn't, even when the code is exactly the same for both?!
Example code:
Range("OnsitePlanErrors1").Copy
Sheets("Errors! - Hours Import").Range("l65536").End(xlUp).Offset(1, 0).PasteSpecial xlValues
Range("OnsitePlanErrors2").Copy
Sheets("Errors! - Hours Import").Range("M65536").End(xlUp).Offset(1, 0).PasteSpecial xlValues
The sheet selection only changes on the second instance.. Can anyone help me please?
Thank you
Faye
New here and wondered if I could have some help please?
I have just upgraded to 2016 and have come across an issue with some vba that has previously been working fine. I am at a dead end as to why it is no longer working, if someone could shed some light I shall be eternally grateful
So, the VBA is copying data from one worksheet and then pasting it into another, without selecting the second sheet, then it copies some other data and does the same.
The issue is that it has started activating the 2nd sheet and then the rest of the macro runs on the wrong sheet! The bizarre thing about it is that the first copy/paste works but the second doesn't, even when the code is exactly the same for both?!
Example code:
Range("OnsitePlanErrors1").Copy
Sheets("Errors! - Hours Import").Range("l65536").End(xlUp).Offset(1, 0).PasteSpecial xlValues
Range("OnsitePlanErrors2").Copy
Sheets("Errors! - Hours Import").Range("M65536").End(xlUp).Offset(1, 0).PasteSpecial xlValues
The sheet selection only changes on the second instance.. Can anyone help me please?
Thank you
Faye