You are on page 1of 4

Sub RegistrarDatos23()

Rem Declaracion de variables

Dim VNºBoleta, VFecha, VCliente, VTelefono, VDirecciòn, VIGV, VTotal As String

Rem Ingresar datos variables

Sheets("Boleta").Select

End Sub

VNºBoleta = Range("E6").Value

VFecha = Range("C7").Value

VCliente = Range("C8").Value

VTelefono = Range("F9").Value

VDirecciòn = Range("C9").Value

VIGV = Range("G24").Value

VTotal = Range("G25").Value

Rem Registrar al final de la BD

Sheets("Registro").Select

Fila = Application.WorksheetFunction.CountA(Range("A:A"))

NFila = Fila + 1

Cells(NFila, 1) = VNºBoleta

Cells(NFila, 2) = VFecha

Cells(NFila, 3) = VCliente

Cells(NFila, 4) = VTelefono

Cells(NFila, 5) = VDirecciòn

Cells(NFila, 6) = VIGV

Cells(NFila, 7) = VTotal

Sub irConsulta()

Sheets("Consulta").Select
Range("E18").Select

End Sub

Sub irRegistro()

Sheets("Registro").Select

Range("I18").Select

End Sub

Sub Listadeempleados()

Sheets("Lista").Select

Range("M18").Select

End Sub

Sub GenerarCodigo()

'Generar un codigo

Sheets("Registro").Select

Fila = Application.WorksheetFunction.CountA(Range("A:A"))

Boleta = Fila

Sheets("Boleta").Select

Cells(6, 5) = Boleta

End Sub

Sub RegistrarDatos()

Sub RegistrarDatos23()

Rem Declaracion de variables

Dim VNºBoleta, VFecha, VCliente, VTelefono, VDirecciòn, VIGV, VTotal As String

Rem Ingresar datos variables

Sheets("Boleta").Select

End Sub
VNºBoleta = Range("E6").Value

VFecha = Range("C7").Value

VCliente = Range("C8").Value

VTelefono = Range("F9").Value

VDirecciòn = Range("C9").Value

VIGV = Range("G24").Value

VTotal = Range("G25").Value

Rem Registrar al final de la BD

Sheets("Registro").Select

Fila = Application.WorksheetFunction.CountA(Range("A:A"))

NFila = Fila + 1

Cells(NFila, 1) = VNºBoleta

Cells(NFila, 2) = VFecha

Cells(NFila, 3) = VCliente

Cells(NFila, 4) = VTelefono

Cells(NFila, 5) = VDirecciòn

Cells(NFila, 6) = VIGV

Cells(NFila, 7) = VTotal

Rem Volver al formulario vacio

Sheets("Boleta").Select

MsgBox "Registro almacenado exitosamente..!!!"

Range("C8:C18,H10:H18").Select

Selection.ClearContents

Range(" C22").Select

End Sub

Sub VistaPrevia()
Range("A1:h26").PrintPreview

End Sub

Sub VistaPrev()

Range("B5:I27").PrintPreview

End Sub

You might also like