Does this work?
Set LifeCraftCodeArea_EPData = Sheet1.Range(Sheet1.Cells(2, Col_LifeCraftCode_EPData), Sheet1.Cells(LastRow_EPData, Col_LifeCraftCode_EPData))
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
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))
Does this work?
Set LifeCraftCodeArea_EPData = Sheet1.Range(Sheet1.Cells(2, Col_LifeCraftCode_EPData), Sheet1.Cells(LastRow_EPData, Col_LifeCraftCode_EPData))