Академический Документы
Профессиональный Документы
Культура Документы
Formulario de Empleados
Private Sub Bcerrar_Click()
Unload Me
Principal.Show
End Sub
End Sub
End Sub
With ActiveCell.EntireRow.Font
.Name = "Calibri"
.Size = 9
End With
Dim x As Integer
x = MsgBox("Seguro que Desea Ingresar este Empleado? ", vbYesNo, "Ingresar Empleado")
If x <> vbYes Then Exit Sub
'Aqui es cuando agregamos o modificamos el registro
Application.ScreenUpdating = False
ActiveCell = Cbcode
ActiveCell.Offset(0, 1) = Tnom: ActiveCell.Offset(0, 2) = The: ActiveCell.Offset(0, 3) = Thsa
ActiveCell.Offset(0, 4) = Val(Tsud.Value): ActiveCell.Offset(0, 5) = Tfecha
ActiveCell.Offset(0, 6) = Truta
Application.ScreenUpdating = True
ActiveWorkbook.Save
Cbcode.Text = Worksheets("Empleados").Range("A2")
Exit Sub
Else
Cells(fCode, 2).Select ' cuando ya existe el registro, cumple esta condición.
End If '1
With ActiveCell.EntireRow.Font
.Name = "Calibri"
.Size = 9
End With
Dim Y As Integer
Y = MsgBox("Seguro que Desea Modificar este Empleado? ", vbYesNo, "Ingresar Empleados")
If Y <> vbYes Then Exit Sub '1
'Aqui es cuando agregamos o modificamos el registro
Application.ScreenUpdating = False
ActiveCell = Cbcode
ActiveCell.Offset(0, 0) = Tnom: ActiveCell.Offset(0, 1) = The: ActiveCell.Offset(0, 2) = Thsa
ActiveCell.Offset(0, 3) = Val(Tsud.Value): ActiveCell.Offset(0, 4) = Tfecha:
ActiveCell.Offset(0, 5) = Truta
Application.ScreenUpdating = True
ActiveWorkbook.Save
Cbcode.Text = Worksheets("Empleados").Range("A2")
End Sub
Sheets("Empleados").Activate
Cells(Cbcode.ListIndex + 2, 1).Select
Tnom = ActiveCell.Offset(0, 1): The = ActiveCell.Offset(0, 2): Thsa = ActiveCell.Offset(0, 3)
Tsud = ActiveCell.Offset(0, 4): Tfecha = ActiveCell.Offset(0, 5)
Truta3 = ActiveCell.Offset(0, 6)
Else
Tnom = "": The = "": Thsa = "": Tsal = 0: Tsud = 0: Tfecha = Date: Truta3 = Truta2.Text
End If
End Sub
Else
Tcod = ""
End If
Cbcode = Tcod
End Sub
End Sub
Else
Tsud = ""
End If
End Sub
Next celda
Cbcode.Text = Worksheets("Empleados").Range("A2")
Tfecha = Date
End Sub
Formulario de Marcajes
Sub TEMPORAL()
CreateObject("wscript.shell").Popup _
"MARCAJE INCORRECTO!: " & vbCr & _
"INTENTE DE NUEVO !", 1, "INCORRECTO"
End Sub
'---------------------------------------------------------------------------------------------------
Private Sub Bcerrar_Click()
Unload Me: Principal.Show
End Sub
'---------------------------------------------------------------------------------------------------
Else
Tnom = ""
End If
End Sub
'---------------------------------------------------------------------------------------------------
Else
Tnom = "": The = "": Tcod3 = ""
Tcod3 = ""
End If
End Sub
'---------------------------------------------------------------------------------------------------
Else
The = ""
End If
End Sub
'---------------------------------------------------------------------------------------------------
If fCode3 = 0 Then
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Activate ' si el registro no existe, se va al final.
Loop
With ActiveCell.EntireRow.Font '--------------*
.Name = "Calibri"
.Size = 9
End With '------------------------------------*
Application.ScreenUpdating = True
ActiveWorkbook.Save: ' Unload Me: Marcaje.Show:
Else
'If fCode2 <> 0 Then
Thsa = Lhora
CommandButton2_Click
Cells(fCode3, 1).Select
'Aqui es cuando agregamos o modificamos el registro
Application.ScreenUpdating = False
ActiveCell = Tcod2
ActiveCell.Offset(0, 3) = Lhora: ActiveCell.Offset(0, 4) = Tfecha
ActiveCell.Offset(0, 6) = Tpla: ActiveCell.Offset(0, 7) = Tti
ActiveCell.Offset(0, 8) = tcp
Application.ScreenUpdating = True
ActiveWorkbook.Save
End If
End Sub
'---------------------------------------------------------------------------------------------------
End Sub
'---------------------------------------------------------------------------------------------------
Else
Tcod = ""
End If
Tcod2 = Tcod + Tfecha: Cbcode2 = Tcod.Text
Cbcode.Text = Tcod.Text
End Sub
'---------------------------------------------------------------------------------------------------
End If '--------------------------2
Lhora.Caption = Time
Sheets("Control").Activate
Application.ScreenUpdating = True
CommandButton1_Click
ActiveWorkbook.Save: Unload Me: Marcaje.Show:
Else
Cells(fCode2, 2).Select
'Aqui es cuando agregamos o modificamos el registro
Application.ScreenUpdating = False
ActiveCell = Cbcode
ActiveCell.Offset(0, 0) = Tnom: ActiveCell.Offset(0, 2) = Lhora
ActiveCell.Offset(0, 3) = Tfecha: ActiveCell.Offset(0, 4) = Tcod2
ActiveCell.Offset(0, 5) = Tpla
Application.ScreenUpdating = True
CommandButton1_Click
ActiveWorkbook.Save: Unload Me: Marcaje.Show:
End If
End If
End Sub
'---------------------------------------------------------------------------------------------------
End Sub
'---------------------------------------------------------------------------------------------------
Next celda
Cbcode.Text = Worksheets("Empleados").Range("A2")
Next celda1
Cbcode2.Text = Worksheets("Control").Range("A2")
'***********************************************************
Next celda2
Cbcode3.Text = Worksheets("Marcajes").Range("A2")
Tfecha = Date
Cbcode2.Text = Cbcode.Text
Tcod = ""
End Sub
Formulario de Comprobantes
Private Sub Bcerrar_Click()
Unload Me: Principal.Show
End Sub
Else
Tnom = "": Tsud = "": Tfecha2 = ""
End If
End Sub
With Sheets("voucher")
.Visible = xlSheetVisible
.PageSetup.Orientation = xlPortrait:
.PrintOut
End With
Application.ScreenUpdating = True
Total = CDate("00:00:00")
For i = 0 To ListBox1.ListCount - 1
Total = Total + CDate(ListBox1.List(i, 4))
Next i
Ttotal = Total
Tiem = CDate(Ttotal) * 24
Tiem.Value = FormatNumber(Tiem.Value, 2)
End Sub
Else
Tcod = ""
End If
End Sub
Me.ListBox1.Clear
Hoja3.Activate
items = Range("listas_mar").CurrentRegion.Rows.Count
For i = 2 To items
End If
Next i
Sumar_Click
CommandButton1_Click
End If
End Sub
Next celda
Cbcode.Text = Worksheets("Empleados").Range("A2")
'***********************************************************
Next celda1
Cbcode2.Text = Worksheets("Control").Range("A2")
End Sub
Sub limpiar()
Sheets("Voucher").Activate