Visual Basic para Aplicaciones - Ayuda con boton modificar

Life is soft - evento anual de software empresarial
 
Vista:

Ayuda con boton modificar

Publicado por jesus (11 intervenciones) el 10/10/2005 19:06:35
tengo el siguiente codigo:

Private Sub CommandButton1_Click()
UserForm4.Hide
UserForm3.Show
TextBox1 = ""
TextBox2 = ""
TextBox4 = ""
TextBox3 = ""
TextBox5 = ""
TextBox6 = ""
TextBox7 = ""
TextBox8 = ""
End Sub

Private Sub CommandButton2_Click()
Worksheets("MUESTRAS").Select
Range("A10").Select

TextBox5 = Cells(8, 4) + 3
TextBox5.Text = TextBox5

TextBox3 = Cells(8, 4)
TextBox3.Text = TextBox3

Selection.EntireRow.Insert
TextBox1 = Empty
TextBox2 = Empty
TextBox4 = Empty

TextBox6 = Empty
TextBox7 = Empty
TextBox8 = Empty
TextBox1.SetFocus
End Sub

Private Sub CommandButton3_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 = ActiveCel

End Sub

Private Sub CommandButton4_Click()
TextBox1 = ""
TextBox2 = ""
TextBox4 = ""
TextBox3 = ""
TextBox5 = ""
TextBox6 = ""
TextBox7 = ""
TextBox8 = ""
TextBox1.SetFocus
End Sub

Private Sub TextBox1_Change()
Worksheets("MUESTRAS").Select
Range("A10").FormulaR1C1 = TextBox1
'Esta primer línea reemplaza a estas dos……
Range("A10").Select
ActiveCell.FormulaR1C1 = TextBox1
End Sub
Private Sub TextBox2_Change()
Range("B10").FormulaR1C1 = TextBox2
End Sub

Private Sub TextBox3_Change()
Range("C10").FormulaR1C1 = TextBox3
End Sub

Private Sub TextBox4_Change()
Range("D10").FormulaR1C1 = TextBox4
End Sub

Private Sub TextBox5_Change()
Range("E10").FormulaR1C1 = TextBox5
End Sub

Private Sub TextBox6_Change()
Range("F10").FormulaR1C1 = TextBox6
End Sub

Private Sub TextBox7_Change()
Range("G10").FormulaR1C1 = TextBox7
End Sub
Private Sub TextBox8_Change()
Range("H10").FormulaR1C1 = TextBox8
End Sub

LA PREGUNTA ES COMO PUEDO PROGRAMAR UN BOTON MODIFICAR, QUE SOLO MODIFIQUE LA INFORMACION QUE ESTA EN EL CAMPO G10 Y MANTENGA LA OTRA INFORMACION INTACTA, INSERTANDOLA EN EL MISMO LUGAR DE DONDE FUE EXTRAIDA A TRAVES DE LA CONSULTA.

SIN MAS QUE AGRGAR, DE ANTEMANO AGRADESCO LA ATENCION PRESTADA.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder