Error 13 incompatibilidad de tipo VBA excel
Resuelto
monalisach
-
monalisach -
monalisach -
Hola,
aquí hay un código que genera el error 13 de incompatibilidad de tipo
Private Sub CommandButton1_Click()
Dim b As Integer
Dim suma() As Double
ReDim suma(1 To 300)
For b = 1 To 300
suma(b) = suma(b) + ThisWorkbook.Worksheets(Feuil1).Cells(b, 10)
If Cells(b + 1, 2) = ThisWorkbook.Worksheets(Feuil1).Cells(b, 5) Then
suma(b + 1) = suma(b + 1) + ThisWorkbook.Worksheets(Feuil1).Cells(b + 1, 10)
End If
ThisWorkbook.Worksheets(Feuil1).Cells(b + 1, 15) = suma(b)
Next b
End Sub
gracias por tu ayuda.
Configuración: Windows 7 / Internet Explorer 9.0
aquí hay un código que genera el error 13 de incompatibilidad de tipo
Private Sub CommandButton1_Click()
Dim b As Integer
Dim suma() As Double
ReDim suma(1 To 300)
For b = 1 To 300
suma(b) = suma(b) + ThisWorkbook.Worksheets(Feuil1).Cells(b, 10)
If Cells(b + 1, 2) = ThisWorkbook.Worksheets(Feuil1).Cells(b, 5) Then
suma(b + 1) = suma(b + 1) + ThisWorkbook.Worksheets(Feuil1).Cells(b + 1, 10)
End If
ThisWorkbook.Worksheets(Feuil1).Cells(b + 1, 15) = suma(b)
Next b
End Sub
gracias por tu ayuda.
Configuración: Windows 7 / Internet Explorer 9.0