Me marca error 91 en tiempo de ejecución vba excel
Sub DUMP_validator()
'-----------------------------------------------------------------------------
' Vector de Parámetros Base
'-----------------------------------------------------------------------------
Dim ind As Integer
NumANT = 1
NumFilasBase = Application.CountA(Sheets("Principal").Range("A:A"))
Set cell = Worksheets("Principal").Range("A:A").Find("name", After:=Range("A1"))
indRowBase = cell.Row
ReDim ParBaseList(1 To NumFilasBase - indRowBase) As String
ReDim ParBaseValue(1 To NumFilasBase - indRowBase) As String
ReDim ParBaseCounter(1 To NumFilasBase - indRowBase) As Integer
For i = 1 To NumFilasBase - indRowBase
ParBaseList(i) = Worksheets("Principal").Range("A" & i + indRowBase).Value
ParBaseValue(i) = Worksheets("Principal").Range("B" & i + indRowBase).Value
Next i
'-----------------------------------------------------------------------------
' Vector de Parámetros DUMP
'-----------------------------------------------------------------------------
NumANT = 1
NumColumsDUMP = Sheets("LNBTS").Cells(1, Cells.Columns.Count).End(xlToLeft).Column
NumFilasDUMP = Application.CountA(Sheets("LNBTS").Range("A:A"))
Set cell = Worksheets("LNBTS").Cells(1, NumColumsDUMP).End(xlToLeft).Find("name")
indColDUMP = cell.Column
ReDim ParDUMPList(1 To NumColumsDUMP - indColDUMP) As String
'ReDim ParDUMPValue(1 To NumColumsDUMP - indColDUMP) As String
For i = 1 To NumColumsDUMP - indColDUMP
ParDUMPList(i) = Worksheets("LNBTS").Cells(1, indColDUMP + i).Value
Next i
'-----------------------------------------------------------------------------
' Comparador
'-----------------------------------------------------------------------------
'
For j = 1 To NumFilasBase - indRowBase
If ParBaseList(j) = ParDUMPList(j) Then
CountObj = 0
For k = 2 To NumFilasDUMP
ParDUMPValue = Worksheets("LNBTS").Cells(k, j + indColDUMP).Value
If ParBaseValue(j) <> ParDUMPValue And ParBaseList(j) <> "enbName" Then
Worksheets("LNBTS").Cells(k, j + indColDUMP).Interior.Color = vbRed
ParBaseCounter(j) = ParBaseCounter(j) + 1
Worksheets("Principal").Range("C" & j + indRowBase).Value = ParBaseCounter(j)
ReDim ObjetDiff(1 To ParBaseCounter(j)) As String
ObjetDiff(ParBaseCounter(j)) = Worksheets("LNBTS").Cells(k, 7).Value
Worksheets("Principal").Cells(j + indRowBase, CountObj + 4).Value = ObjetDiff(ParBaseCounter(j))
CountObj = CountObj + 1
End If
Next k
Else
MsgBox ("Parametro: " & ParBaseList(j) & " incorrecto, revisar listado base")
GoTo Salir
End If
Next j
MsgBox ("Revisión Terminada")
Salir:
End Sub