Clase Programación 3ro. Visual Basic

 Dejo clase con lo visto de formulario



Además acompaño con las lineas de programación que utilizamos

Private Sub CommandButton1_Click()
Dim nombrex As Range
Dim apellidox As Range
Dim sexox As Range
Dim nota1x As Range
Dim nota2x As Range
Dim nota3x As Range
Dim promediox As Range

Set nombrex = ActiveDocument.Bookmarks("nombre").Range
nombrex = txt_nombre.Value
Set apellidox = ActiveDocument.Bookmarks("apellido").Range
apellidox = txt_apellido.Value
Set sexox = ActiveDocument.Bookmarks("sexo").Range
sexo = txt_sexo.Value
Set cursox = ActiveDocument.Bookmarks("curso").Range
cursox = txt_curso.Value
Set nota1x = ActiveDocument.Bookmarks("nota1").Range
nota1x = txt_nota1.Value
Set nota2x = ActiveDocument.Bookmarks("nota2").Range
nota2x = txt_nota2.Value
Set nota3x = ActiveDocument.Bookmarks("nota3").Range
nota3x = txt_nota3.Value
Set promediox = ActiveDocument.Bookmarks("promedio").Range
promediox = txt_promedio.Value
End Sub


Private Sub UserForm_Activate()
     txt_sexo.AddItem ("Masculino")
     txt_sexo.AddItem ("Femenino")
     txt_sexo.ListIndex = 0

     txt_curso.AddItem ("1 taller")
     txt_curso.AddItem ("2 taller")
     txt_curso.AddItem ("3 taller")
     txt_curso.AddItem ("4 taller")
     txt_curso.AddItem ("5 taller")
     txt_curso.AddItem ("6 taller")
     txt_curso.ListIndex = 0
End Sub

Comentarios

Entradas populares