Do not use ...
test_policy_array = Range([c_Test_Pol], [c_Test_Pol].End(xlDown))
Instead use ...
test_policy_array = Range([c_Test_Pol], [c_Test_Pol].Offset(Worksheetfunction.Counta([c_Test_Pol].EntireColumn) -2))
Do you see why?
When [c_Test_Pol] name refers to last cell in area, or it referes to a cell that nothing below it, going down to end using xlDown will go to last cell in column, which is cell 1,024,000
We do not want to do that, right?
test_policy_array = Range([c_Test_Pol], [c_Test_Pol].End(xlDown))
Instead use ...
test_policy_array = Range([c_Test_Pol], [c_Test_Pol].Offset(Worksheetfunction.Counta([c_Test_Pol].EntireColumn) -2))
Do you see why?
When [c_Test_Pol] name refers to last cell in area, or it referes to a cell that nothing below it, going down to end using xlDown will go to last cell in column, which is cell 1,024,000
We do not want to do that, right?
Views 160
Downloads 56
CodeID
DB ID