BritsBlitz
New Member
- Joined
- Jan 10, 2014
- Messages
- 34
- Office Version
- 365
- Platform
- Windows
Hi
I am trying to write a very simple code which looks to see if a checkbox is checked, and if it is, it will copy a range of data from one worksheet into another worksheet. The code below works just fine for what I want, except that I’m limited to always starting the paste in cell A1 on the “Sheet2” worksheet. I know how to change the ActiveCell value to any cell in the worksheet, but how do I replace the Range(“A1”) with the ActiveCell value so that the data will be pasted to the ActiveCell, and not always to Cell A1?
If Sheet1.Range("C2").Value = True Then
Sheets("Sheet3").Range("A4:D13").Copy
Sheets("Sheet2").Range("A1").PasteSpecial xlValues
Sheets("Sheet2").Range("A1").PasteSpecial xlFormats
Application.CutCopyMode = False
End If
I am trying to write a very simple code which looks to see if a checkbox is checked, and if it is, it will copy a range of data from one worksheet into another worksheet. The code below works just fine for what I want, except that I’m limited to always starting the paste in cell A1 on the “Sheet2” worksheet. I know how to change the ActiveCell value to any cell in the worksheet, but how do I replace the Range(“A1”) with the ActiveCell value so that the data will be pasted to the ActiveCell, and not always to Cell A1?
If Sheet1.Range("C2").Value = True Then
Sheets("Sheet3").Range("A4:D13").Copy
Sheets("Sheet2").Range("A1").PasteSpecial xlValues
Sheets("Sheet2").Range("A1").PasteSpecial xlFormats
Application.CutCopyMode = False
End If