Run-time error '1004' : Method 'Range' of object'_worksheet' failed

Captain Bobby 0 Reputation points
2024-07-27T11:06:23.5033333+00:00

I have 2 sheets in my workbook, while source sheet was active, following line work properly, but while target sheet was active, a error message would pop up, like "Run-time error '1004' : Method 'Range' of object'_worksheet' failed"

My COde

Set LifeCraftCodeArea_EPData = Sheet1.Range(Cells(2, Col_LifeCraftCode_EPData), Cells(LastRow_EPData, Col_LifeCraftCode_EPData))

Excel
Excel
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
1,695 questions
0 comments No comments
{count} votes