Elsa ya funciono, escribe en la ultima fila
pero tengo el problema que no las graba sin embargo el codigo reconoce que ya escribio ahi.
queme faltara ? y no encontre tu email, por eso escribi aqui otra vez. lo que me habias requierido eliminar solo lo puse como comentario, ya despues lo elimino. y nuevamente muchas gracias
pongo codigo:
'< Boton Guardar >
Private Sub CommandButton1_Click()
'Selection.EntireRow.Insert
TextBox1 = Empaty
TextBox2 = Empaty
TextBox3 = Empaty
TextBox4 = Empaty
TextBox5 = Empaty
MsgBox "Alta exitosa.", vbInformation, "EXCELeINFO"
Unload Me
' ordenar Macro
'
Range("B2:E50").Select
ActiveWindow.SmallScroll Down:=-45
ActiveWorkbook.Worksheets("Datag").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Datag").Sort.SortFields.Add Key:=Range("B3:B50"), _
SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortTextAsNumbers
With ActiveWorkbook.Worksheets("Datag").Sort
.SetRange Range("B2:E50")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Range("B1:E1").Select
End Sub
Private Sub UserForm_Initialize()
finx = ActiveSheet.Range("B" & Rows.Count).End(xlUp).Row + 1
End Sub
Private Sub CommandButton2_Click()
TextBox1 = Empaty
TextBox2 = Empaty
TextBox3 = Empaty
TextBox4 = Empaty
TextBox5 = Empaty
Unload Me
End Sub
Private Sub TextBox1_Change()
Range(" B" & finx) = TextBox1
'ActiveCell.FormulaR1C1 = TextBox1
Range(" G" & finx) = TextBox1
'ActiveCell.FormulaR1C1 = TextBox1
End Sub
Private Sub TextBox2_Change()
Range(" C" & finx) = TextBox2
'ActiveCell.FormulaR1C1 = TextBox2
Range(" H" & finx) = TextBox2
'ActiveCell.FormulaR1C1 = TextBox2
End Sub
Private Sub TextBox3_Change()
Range(" D" & finx) = TextBox3
'ActiveCell.FormulaR1C1 = TextBox3
Range(" I" & finx) = TextBox3
'ActiveCell.FormulaR1C1 = TextBox3
End Sub
Private Sub TextBox4_Change()
Range(" E" & finx) = TextBox4
'ActiveCell.FormulaR1C1 = TextBox4
End Sub
Private Sub TextBox5_Change()
Range(" J" & finx) = TextBox5
'ActiveCell.FormulaR1C1 = TextBox5
End Sub