It seems to me that your range is incorrectly defined.
It should be something like this range (cells (x1, y1), cells (x2, y2))
Also, if this is a constructed worksheet at run time, you may need to use ThisWorkbook or ActiveSheet links.
Try changing your range in the format above and let me know.
source
share