Vous êtes sur la page 1sur 2

Private Sub grabar_Click()

Dim xfil As Integer

If Len(ruc.Text) <> 11 Then


MsgBox "Verificar el N° de RUC", vbInformation, "Aviso !!!!"
ruc.SetFocus
Exit Sub
End If

Range("A6").Activate
xfil = ActiveCell.CurrentRegion.Rows.Count

ActiveCell.Offset(xfil, 0) = ruc
ActiveCell.Offset(xfil, 1) = razon_social
ActiveCell.Offset(xfil, 2) = direccion
ActiveCell.Offset(xfil, 3) = distrito
ActiveCell.Offset(xfil, 6) = telefono

If moquegua_otros.Value = True Then


ActiveCell.Offset(xfil, 4) = "Moquegua"
Else
ActiveCell.Offset(xfil, 4) = "Otros"
End If

If nuevo.Value = True Then


ActiveCell.Offset(xfil, 5) = "Bueno"
Else
ActiveCell.Offset(xfil, 5) = "Excelente"
End If

End Sub

Private Sub nuevo_Click()


ruc = Empty
razon_social = Empty
direccion = Empty
distrito = Empty
telefono = Empty
Me.moquegua_otros.Value = True
ruc.SetFocus

End Sub

Private Sub salir_Click()


Unload Me

End Sub

Private Sub UserForm_Initialize()

distrito.List = Worksheets("DISTRITO").Range("A5:A24").Value

End Sub
Sub Mensaje()

MsgBox "Prueba de mensaje"

MsgBox "Prueba2", vbOKOnly + vbExclamation, "EXCELeINFO"

MsgBox "Prueba3", vbInformation + vbYesNoCancel + vbDefaultButton3, "EXCELeINFO",


"ayuda.hlp", 101

End Sub

Sub MensajeConIF()

Dim Respuesta As Byte


Dim Titulo As String

Titulo = "EXCELeINFO"

Respuesta = MsgBox("Deseas continuar?" & Chr(13) & vbNewLine & "Recuerda...",


vbQuestion + vbYesNo, Titulo)

If Respuesta = vbYes Then


MsgBox "Elegiste SÍ"
Else
MsgBox "Elegiste NO"
End If

End Sub

Sub MensajeConIF2()

Dim Respuesta As Byte


Dim Titulo As String

Titulo = "EXCELeINFO"

Respuesta = MsgBox("Deseas continuar con la ejecución de la macro?", _


vbQuestion + vbYesNo, "Titulo")

If Respuesta = 7 Then Exit Sub

MsgBox "Elegiste SÍ"

End Sub

Vous aimerez peut-être aussi

  • Acces Practicas
    Acces Practicas
    Document6 pages
    Acces Practicas
    Nestor Henry Poma Clemente
    Pas encore d'évaluation
  • Practica 03
    Practica 03
    Document6 pages
    Practica 03
    Nestor Henry Poma Clemente
    Pas encore d'évaluation
  • Trbajo Project
    Trbajo Project
    Document5 pages
    Trbajo Project
    Nestor Henry Poma Clemente
    Pas encore d'évaluation
  • Capacitación TIC UGEL MN - 2020
    Capacitación TIC UGEL MN - 2020
    Document38 pages
    Capacitación TIC UGEL MN - 2020
    Nestor Henry Poma Clemente
    Pas encore d'évaluation
  • Practica 01
    Practica 01
    Document9 pages
    Practica 01
    Nestor Henry Poma Clemente
    Pas encore d'évaluation
  • Práctica #4 Gimnasio
    Práctica #4 Gimnasio
    Document1 page
    Práctica #4 Gimnasio
    Nestor Henry Poma Clemente
    Pas encore d'évaluation
  • Practicas Formularios
    Practicas Formularios
    Document4 pages
    Practicas Formularios
    Nestor Henry Poma Clemente
    Pas encore d'évaluation
  • Practica 01
    Practica 01
    Document2 pages
    Practica 01
    Nestor Henry Poma Clemente
    Pas encore d'évaluation
  • Práctica #4 Gimnasio
    Práctica #4 Gimnasio
    Document1 page
    Práctica #4 Gimnasio
    Nestor Henry Poma Clemente
    Pas encore d'évaluation
  • TEXTO 02 Lectura
    TEXTO 02 Lectura
    Document2 pages
    TEXTO 02 Lectura
    Nestor Henry Poma Clemente
    Pas encore d'évaluation
  • TEXTO 01 Lectura
    TEXTO 01 Lectura
    Document2 pages
    TEXTO 01 Lectura
    Nestor Henry Poma Clemente
    100% (1)
  • Practicas Word Avanzado Numerado
    Practicas Word Avanzado Numerado
    Document24 pages
    Practicas Word Avanzado Numerado
    Nestor Henry Poma Clemente
    Pas encore d'évaluation
  • Bienvenido Plumas
    Bienvenido Plumas
    Document19 pages
    Bienvenido Plumas
    Nestor Henry Poma Clemente
    100% (5)
  • APURIMAC
    APURIMAC
    Document1 page
    APURIMAC
    Nestor Henry Poma Clemente
    Pas encore d'évaluation