ReDim Preserve arrayCodigos(1)
arrayCodigos(0) = "Codigos"
Set ElisaCnn = New Connection
ElisaCnn.Open "PROVIDER=MSDASQL;dsn=ELISA;uid=;pwd=datosElisaCNDR;"
Set rsElisa = New Recordset
rsElisa.Open "Select * from DatosProtocoloChik", ElisaCnn, adOpenDynamic, adLockOptimistic
For i = 0 To 95
If Not frmMain.txtProtocolo(i).Text Like "SINM*" Then
If Not InStr(Join(arrayCodigos), Left(frmMain.txtProtocolo(i).Text, Len(frmMain.txtProtocolo(i).Text) - 1)) > 0 Then
arrayCodigos(UBound(arrayCodigos)) = Left(frmMain.txtProtocolo(i).Text, Len(frmMain.txtProtocolo(i).Text) - 1)
ReDim Preserve arrayCodigos(UBound(arrayCodigos) + 1)
End If
End If
Next i
Dim NewSize As Integer
NewSize = UBound(arrayCodigos) - 2
ReDim Preserve arrayMedias(NewSize, 2)
For j = LBound(arrayCodigos) + 1 To UBound(arrayCodigos) - 1