Hice una macro que cuando la corro no me saca los resultados del
Textbox6 y TextBoxt7, los resultados de estos textBox es la suma:
TextBox6 = (TextBox8) + (TextBox9) + (TextBox10) + (TextBox11) +
(TextBox12) + (TextBox13) + (TextBox14)
TextBox7 = (TextBox8) + (TextBox9) + (TextBox10) + (TextBox13) +
(TextBox14)
Me parece que me falto algo. Pego mi programa para que lo vean
Gracias
Private Sub CommandButton1_Click()
Cells.Find(What:=TextBox1, After:=ActiveCell, LookIn:=xlFormulas,
LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:= _
False).Activate
ActiveCell.Offset(0, 1).Select
TextBox2 = ActiveCell
ActiveCell.Offset(0, 1).Select
TextBox3 = ActiveCell
ActiveCell.Offset(0, 1).Select
TextBox4 = ActiveCell
ActiveCell.Offset(0, 1).Select
TextBox5 = ActiveCell
ActiveCell.Offset(0, 1).Select
TextBox6 = ActiveCell
ActiveCell.Offset(0, 1).Select
TextBox7 = ActiveCell
ActiveCell.Offset(0, 1).Select
TextBox8 = ActiveCell
ActiveCell.Offset(0, 1).Select
TextBox9 = ActiveCell
ActiveCell.Offset(0, 1).Select
TextBox10 = ActiveCell
ActiveCell.Offset(0, 1).Select
TextBox11 = ActiveCell
ActiveCell.Offset(0, 1).Select
TextBox12 = ActiveCell
ActiveCell.Offset(0, 1).Select
TextBox13 = ActiveCell
ActiveCell.Offset(0, 1).Select
TextBox14 = ActiveCell
End Sub
Private Sub CommandButton2_Click()
Selection.EntireRow.Delete
Range("B4").Select
TextBox1 = Empty
TextBox2 = Empty
TextBox3 = Empty
TextBox4 = Empty
TextBox5 = Empty
TextBox6 = Empty
TextBox7 = Empty
TextBox8 = Empty
TextBox9 = Empty
TextBox10 = Empty
TextBox11 = Empty
TextBox12 = Empty
TextBox13 = Empty
TextBox14 = Empty
TextBox1.SetFocus
End Sub
Private Sub CommandButton3_Click()
Range("B4").Select
Selection.EntireRow.Insert
TextBox1 = Empty
TextBox2 = Empty
TextBox3 = Empty
TextBox4 = Empty
TextBox5 = Empty
TextBox6 = Empty
TextBox7 = Empty
TextBox8 = Empty
TextBox9 = Empty
TextBox10 = Empty
TextBox11 = Empty
TextBox12 = Empty
TextBox13 = Empty
TextBox14 = Empty
End Sub
Private Sub TextBox1_Change()
Range("B4").FormulaR1C1 = TextBox1
End Sub
Private Sub TextBox10_Change()
Range("K4").FormulaR1C1 = TextBox10
End Sub
Private Sub TextBox11_Change()
Range("L4").FormulaR1C1 = TextBox11
End Sub
Private Sub TextBox12_Change()
Range("M4").FormulaR1C1 = TextBox12
End Sub
Private Sub TextBox13_Change()
Range("N4").FormulaR1C1 = TextBox13
End Sub
Private Sub TextBox14_Change()
Range("O4").FormulaR1C1 = TextBox14
End Sub
Private Sub TextBox2_Change()
Range("C4").FormulaR1C1 = TextBox2
End Sub
Private Sub TextBox3_Change()
Range("D4").FormulaR1C1 = TextBox3
End Sub
Private Sub TextBox4_Change()
Range("E4").FormulaR1C1 = TextBox4
End Sub
Private Sub TextBox5_Change()
Range("F4").FormulaR1C1 = TextBox5
End Sub
Private Sub TextBox6_Change()
Range("G4").FormulaR1C1 = TextBox6
ActiveCell.FormulaR1C1 = TextBox6
Rem aqui se crea la formula
TextBox6 = Val(TextBox8) + Val(TextBox9) + Val(TextBox10) +
Val(TextBox11) + Val(TextBox12) + Val(TextBox13) + Val(TextBox14)
End Sub
Private Sub TextBox7_Change()
Range("H4").FormulaR1C1 = TextBox7
ActiveCell.FormulaR1C1 = TextBox7
Rem aqui se crea la formula
TextBox7 = Val(TextBox8) + Val(TextBox9) + Val(TextBox10) +
Val(TextBox13) + Val(TextBox14)
End Sub
Private Sub TextBox8_Change()
Range("I4").FormulaR1C1 = TextBox8
End Sub
Private Sub TextBox9_Change()
Range("J4").FormulaR1C1 = TextBox9
End Sub
Leer las respuestas