L
Legacy 146544
Guest
Hi all,
I need to select a range (on a different worksheet than the active one) based on input so I created this code:
Where RLocatie is the row number.
But I get runtime error 1004 on the second line of code. For some reason Excel can't select the range?
Does anyone know what might be the problem?
I need to select a range (on a different worksheet than the active one) based on input so I created this code:
ThisWorkbook.Worksheets("Debiteuren").Activate
Worksheets("Debiteuren").Range(Cells(RLocatie - 1, 1), Cells(RLocatie - 1, 52)).Select
Where RLocatie is the row number.
But I get runtime error 1004 on the second line of code. For some reason Excel can't select the range?
Does anyone know what might be the problem?