Hello

For testing purposes, I used this code for just one sheet:

num = Range("A1").Offset(Rows.Count - 1, 0).End(xlUp).Row
It worked perfectly
Now, this should be run from another sheet, so I included:

num = Worksheets(1).Range("A1").Offset(Worksheets(1).Rows.Count - 1, 0).End(xlUp).Row
But excel is throwing me 1004 error messages and I am lost,
because I tried plenty of combinations and not a single one worked.

I think it's a minor problem, but I am too new to VBA to see it.
Thanks in advance