51DegreesNorth
New Member
- Joined
- Mar 29, 2022
- Messages
- 11
- Office Version
- 365
- Platform
- Windows
The application I'm working on must keep two rows in sync. These rows live on two different sheets within one workbook.
I can do the sync using select and copy/paste, but I'm looking for a much faster way.
I'd like to end up with just one statement in the form "Range.Value=Range.value" .
What is going on here ? What am I missing ?
Thank you.
I can do the sync using select and copy/paste, but I'm looking for a much faster way.
VBA Code:
Sub Alt_Copy()
Dim Src_PO_Nr As Long
Dim FindRow As Long
Src_PO_Nr = 5
FindRow = 10
'this line of code gets executed
ThisWorkbook.Sheets("B").Range(Cells(FindRow, 1), Cells(FindRow, 41)).Value = 10
'this one causes error 1004 - but they are basically the same !
ThisWorkbook.Sheets("A").Range(Cells(Src_PO_Nr, 1), Cells(Src_PO_Nr, 41)).Value = 20
End Sub
I'd like to end up with just one statement in the form "Range.Value=Range.value" .
What is going on here ? What am I missing ?
Thank you.