Error 13 incompatibilidad de tipo VBA excel

Resuelto
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

2 respuestas

f894009 Mensajes publicados 17417 Fecha de registro   Estado Miembro Última intervención   1 717
 
Hola,

El nombre de la hoja de Excel debe estar entre comillas dobles: ej--->"Hoja1"

Que tengas un buen día.
1