I use some code to update data on a daily basis. It copies data from one tab and pastes to another. To determine what row I want to paste to I use this code
this by the way is a snippet
If I run the code as usual 'rno' = 0
If I step through the code 'rno' = 631 which is what it should
I am confused and slowly getting frustrated. Can anyone advise a possible reason please ?
Thanks
Paul
this by the way is a snippet
Code:
Worksheets("Booking Data").Activate
wkno = Format(Sheets("Input").Range("O6"), "DD/MM/YYYY")
rno = Range(Cells(2, 2), Cells(5000, 2)).Find(wkno, LookIn:=xlValues).Row - 1
Application.Goto Reference:="BOOKTRANS"
Selection.Copy
Sheets("Booking Data").Activate
Range("b1").Select
ActiveCell.Offset(rno, 1).Select
Selection.PasteSpecial Paste:=xlValues, Transpose:=True
If I run the code as usual 'rno' = 0
If I step through the code 'rno' = 631 which is what it should
I am confused and slowly getting frustrated. Can anyone advise a possible reason please ?
Thanks
Paul