Small Paul
Board Regular
- Joined
- Jun 28, 2018
- Messages
- 118
Hi
I am having difficulty with a Paste Special line in my VBA and cannot work out why. I have searched various websites and tried a load of different things, without success!
The section of code is:
The correct cell is being copied. The correct worksheet is selected. The 'Offset' selects the right cell.
Unfortunately it gives a Run-time error 1004: PasteSpecial method of Range class failed.
Any suggestions would be appreciated.
Many thanks
Small Paul.
I am having difficulty with a Paste Special line in my VBA and cannot work out why. I have searched various websites and tried a load of different things, without success!
The section of code is:
Code:
Worksheets("Required Data").Activate
ActiveCell.Offset(0, 2).Copy
detail = ActiveCell.value
Sheets(detail).Select
ActiveCell.Offset(-2, 1).PasteSpecial xlPasteValues
The correct cell is being copied. The correct worksheet is selected. The 'Offset' selects the right cell.
Unfortunately it gives a Run-time error 1004: PasteSpecial method of Range class failed.
Any suggestions would be appreciated.
Many thanks
Small Paul.