miércoles, 2 de mayo de 2012

Realizar un formulario :)

Private Sub CommandButton1_Click()
Sheets("Captura").Select
[A2] = Val(TextBox1)
[B2] = TextBox2
[C2] = TextBox3
[D2] = Val(TextBox4)
[E2] = Val(TextBox5)
'calculo de sueldo total
TextBox6 = Val(TextBox4) + Val(TextBox5)
'calculo de IGSS
TextBox7 = Val(TextBox4) * 0.0483

'calculo de liquidacion
TextBox8 = Val(TextBox6) - Val(TextBox7)
Range("A2:E2").Select
    Selection.Copy
    Sheets("Base_Datos").Select
    Range("A2:E2").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    Range("E2").Select
    Application.CutCopyMode = False
    Selection.EntireRow.Insert , CopyOrigin:=xlFormatFromLeftOrAbove
    Sheets("Captura").Select
    Range("A2:E2").Select
    Selection.ClearContents
    Range("A2").Select






End Sub