Hello, Rahul!
Thanks for reaching out here regarding this query!
When you use a VBA code to select a range that is not in the active worksheet, VBA will show you the run-time error 1004.
Because, if you want to select a cell or range of cells for a particular worksheet needs to be active at that point. You cannot select a cell from the sheet1 if the sheet2 is active right now.
Hope this helps.
Warm regards,
Albert