Error en boton,formulario excel
Publicado por Pato (1 intervención) el 17/01/2020 09:04:19
Hola,tengo un error y no entiendo muy bien por que me aparece ,me aparece el error de uso de la propiedad no es valido. adjunto la parte del código en la cual tengo error,también se me hace super raro el error por que lo hice siguiendo un tutorial de youtube (solo que con diferentes valores) mdifique el tutorial a mis necesidades .espero me puedan ayudar 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
Private Sub CommandButton1_Click()
Dim xfill As Integer
Range ("B4")
xfill = ActiveCell.CurrentRegion.Rows.Count
ActiveCell.Offset(xfill, 1) = ComboBox5.Text
ActiveCell.Offset(xfill, 2) = ComboBox1.Text
ActiveCell.Offset(xfill, 3) = aut.Text
ActiveCell.Offset(xfill, 4) = ampli.Text
ActiveCell.Offset(xfill, 5) = redu.Text
If ComboBox3.ListIndex = 0 Then
ActiveCell.Offset(xfill, 7) = req.Text
ActiveCell.Offset(xfill, 8) = rad.Text
ActiveCell.Offset(xfill, 9) = con.Text
ActiveCell.Offset(xfill, 10) = iva.Text
ActiveCell.Offset(xfill, 11) = sin.Text
End If
If ComboBox3.ListIndex = 1 Then
ActiveCell.Offset(xfill, 12) = req.Text
ActiveCell.Offset(xfill, 13) = rad.Text
ActiveCell.Offset(xfill, 14) = con.Text
ActiveCell.Offset(xfill, 15) = iva.Text
ActiveCell.Offset(xfill, 16) = sin.Text
End If
If ComboBox3.ListIndex = 2 Then
ActiveCell.Offset(xfill, 17) = req.Text
ActiveCell.Offset(xfill, 18) = rad.Text
ActiveCell.Offset(xfill, 19) = con.Text
ActiveCell.Offset(xfill, 20) = iva.Text
ActiveCell.Offset(xfill, 21) = sin.Text
End If
If ComboBox3.ListIndex = 3 Then
ActiveCell.Offset(xfill, 22) = req.Text
ActiveCell.Offset(xfill, 23) = rad.Text
ActiveCell.Offset(xfill, 24) = con.Text
ActiveCell.Offset(xfill, 25) = iva.Text
ActiveCell.Offset(xfill, 26) = sin.Text
End If
End Sub
Valora esta pregunta


0