Error 13 en ejecución de macro

Compañeros, al ejecutar una macro sale el siguiente error no. 13 No Coinciden los Tipos en la siguiente línea.

Sheets("reporte").Range("H2").Value = Sheets("registro").Range("M21") * 0.5

1 Respuesta

Respuesta
1

Muestra una imagen de la planilla, porque se me ocurre que en M21 no tenés un dato numérico

¡Gracias! 

Gustavo

te muestro el código completo

For a = 1 To [t13].Value
'Regional Antioquia'
If RegAnt.Value = True Then
Sheets("reporte").Range("A2").EntireRow.Insert (xlDown)
Sheets("Reporte").Range("b2").Value = "Antioquia"
Sheets("registro").Range("M7").Copy
Sheets("Reporte").Range("G2").PasteSpecial xlPasteValues
Sheets("Reporte").Range("E2").Value = 1 & " " & "DE" & " " & [t13] 'factura'
Sheets("reporte").Range("C2").Value = Me.TextBox1.Value
Sheets("reporte").Range("k2").Value = Me.TextBox20.Value
Sheets("reporte").Range("H2").Value = Sheets("reporte").Range("G2") * 0.5
Sheets("reporte").Range("I2").Value = Sheets("reporte").Range("G2") * 0.45
Sheets("reporte").Range("J2").Value = Sheets("reporte").Range("G2") * 0.05
If CheckBox4.Value = True Then
Sheets("reporte").Range("l2").Value = "Si"
Else
Sheets("reporte").Range("l2").Value = "NO"
End If
'Factura'
Worksheets("Clientes").Range("AO2").Value = Me.TextBox23.Value
If TextBox23.Value >= 2 Then
Worksheets("Reporte").Range("D2").Value = 1 & Space(1) & "DE" & Space(1) & TextBox23.Value
Else
Worksheets("Reporte").Range("D2").Value = Me.TextBox23.Value & " " & "DE" & " " & TextBox23.Value 'factura'
Worksheets("Reporte").Range("D2").Value = Me.TextBox23.Value & 1 & " " & "DE" & " " & TextBox23.Value 'factura'
End If
End If

Ok, pero lo que quería era ver la imagen de la planilla, porque se me hace que el valor de G2 no está quedando como número sino como texto

Añade tu respuesta

Haz clic para o

Más respuestas relacionadas