I am trying to use Application.Index to write a specific column of a 2D array to a worksheet.
See extract of code below. Everything runs fine until it reaches the .Cells line and then it goes to the error handler. Why?
![]()
With ThisWorkbook On Error Resume Next .Unprotect pwdWorkbook With .Worksheets(sht_CalcBonus) .Activate .Unprotect pwdGeneric On Error GoTo FunctionFailed .Cells(6, 2).Resize(UBound(varEmployeeArray, 1), 1) = Application.Index(varEmployeeArray, , 2) End With End With
Bookmarks