lunes, 6 de mayo de 2013

Factura Corta

INGRESAR
USUARIO:

usuario.Text = ""
usuario.ForeColor = &HC00000



CONTRASEÑA:

Private Sub contraseña_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
contraseña.Text = ""
contraseña.ForeColor = &HC00000
contraseña.PasswordChar = "*"

If usuario.Text = "Usuario" Or usuario.Text = "" Then
MsgBox "Debe Ingresar Usuario", vbCritical, "Atencion"
End If



BOTON ENTRAR:

If usuario.Text = "JosyL." And contraseña.Text = "2511" Then
MsgBox "Bienvenido", vbInformation, "Felicitaciones"

INGRESAR.Hide
UserForm2.Show
Else
MsgBox "Contraseña o Usuario Incorrecto", vbCritical, "Alerta"
End If



MENU

INGRESAR PRODUCTO: 
UserForm2.Hide
REGISTRO.Show


FACTURACION:

UserForm2.Hide
UserForm1.Show


INGRESO DE PRODUCTOS:
GUARDAR:

Sheets("DATA_BASE").Select

On Error Resume Next
    Cells.Find(What:=codigo, After:=ActiveCell, LookIn:=xlFormulas, _
    LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
    MatchCase:=False, SearchFormat:=False).Activate

    comparation.Caption = ActiveCell

If comparation.Caption = codigo Or codigo = Empty Then
    MsgBox "ESTE CODIGO YA EXISTE!", vbOKOnly, "ALERTA!!"
    codigo = Empty
    codigo.SetFocus
Else
    Range("A2").Select
    Do While Not IsEmpty(ActiveCell)
        ActiveCell.Offset(1, 0).Select
    Loop
 
    ActiveCell = codigo.value
    ActiveCell.Offset(0, 1).Select
    ActiveCell = name1.value
    ActiveCell.Offset(0, 1).Select
    ActiveCell = value.value
    ActiveCell.Offset(0, 1).Select
    ActiveCell = excis.value
 
    ActiveWorkbook.Save
    MsgBox "SUS DATOS HAN SIDO INGRESADO!!", vbOKOnly, "!CONGRATULATION!"
 
    codigo = Empty
    name1 = Empty
    value = Empty
    excis = Empty
    name1.SetFocus

End If

REGRESAR:

REGISTRO.Hide
UserForm2.Show

No hay comentarios:

Publicar un comentario