0

I wrote a bunch of SAP scripting code that works great and here comes (as usual) one of those issues that make no sense whatsoever.

So, I've tried two lines of code so far and about 500 variations of those two. In both cases, I get "Application-defined or object-defined error."

ThisWorkbook.Worksheets(7).Range(Cells(3, 1) & Cells(3, 1).End(xlDown)).Copy
ThisWorkbook.Worksheets(7).Range("A3:" & Range("A3").End(xlDown)).Copy

I simply want to select from A3 all the way down as far as the data goes. Can it get any simpler than that?

Cindy Meister
  • 25,071
  • 21
  • 34
  • 43
  • [Try this](https://stackoverflow.com/questions/38882321/better-way-to-find-last-used-row/38882823#38882823) the way you find your last row is unreliable. Also check all your ranges are correct and there actually is a last row to find beyond where you start. – Plutian Oct 22 '19 at 09:44
  • Hi Plutian, it actually didn't help but I figured it out :) – vlad_milovanovic Oct 22 '19 at 10:04

1 Answers1

0

The solution was to actually specify that the last row is the Address. Mind. Blown.

Range("A3:" & Range("A1048576").End(xlUp).Address).Copy