Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88075

Object variable or With block variable not set. Why?

$
0
0

I'm getting the error mentioned here:

Error

…From this section of code...

Code1

...and as you'll see, the cell variables for the lastrow and lastcol are reporting fine, so why am I getting this error?

code2

code3

I tried adjust it as so too, but still the same issue.

code4

Basically, I'm just trying to set Rg as a range using cell values as determined by the two variables above. Using Excel 2016 VBA. Thanks. Will check back tomorrow.


Viewing all articles
Browse latest Browse all 88075

Trending Articles