Error on Set Rng statement?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi all. Any idea why this line errors out if the *** Data is not
the active ***? If I run the code while on the Data ***, all
works well. If I run thwe code while on any other ***, I get an
"application defined or object defined error". Thanks!

Set rng = Worksheets("Data").Range(Cells(1, 1), Cells(Rows.Count,
1).End(xlUp))
.


Quantcast