I've edited my original question because my Source cells contain Hyperlinks which I need copied over to the Target cells, so I just realized that solutions using .value and .resize won't work for me.
Using VBA I need to copy a range of cells from one sheet to another in the same workbook using the Cells(R,C) method (instead of Range("A1:A10")
method) because my Rows/Columns are variables that I'm detecting with code. Therefore I cannot hard code the Row numbers as the last row will vary.
Originally I was pursuing using the .value property instead of the .value property but that was before I realized that my Hyperlinks would not get copied over.
I learned from the responses here that the Cells(r,c) reference assumes the sheet is the ActiveSheet (whereas Range() doesn't) and since both the Source Sheet & Target Sheet cannot both be ActiveSheet at the same time, this creates a problem.
This code was suggested in a response to my original question but unfortunately this created a 400 runtime error.
Sub CopyCells()
Const TargetSheet = "Sheet1"
Const SourceSheet = "Sheet2"
'Goal is to copy the cells Sheets("Sheet2").Range("B10:B19") to Sheets("Sheet1").Range("F1:F10")
'Below line of code gives 400 error
Sheets(SourceSheet).Range(Cells(10, 2), Cells(19, 2)).Copy (Sheets(TargetSheet).Cells(1, 6))
End Sub
Can someone let me know what I'm doing wrong?