0
Sheets("test1").Range(Cells(2, 1), Cells(2, 4)).Select

I am getting object-define error for above line of code. Could someone tell me please what is wrong with it?

Storax
  • 11,158
  • 3
  • 16
  • 33
  • Code is working for me but sheet _test1_ was the active one when I ran it. – Storax Jan 03 '20 at 14:45
  • Simply put, you are on a different sheet while this line executes. As a result, `Cells` will refer to cells on that specific sheet instead of test1. – shahkalpesh Jan 03 '20 at 14:45

0 Answers0