Ejemplos aplicados de flip flops para la ingenieria
Lección 86
1. Lección 86
Private SubBotónCerrar_Click()
UnloadFormulario
End Sub
Private SubBotónAceptar1_Click()
If CampoNombre.Text="" Then
MsgBox "Porfavor inserte sunombre"
ElseIf CampoCiudad.Text="" Then
MsgBox "Porfavor inserte ciudad"
Else
ActiveWorkbook.Save
End If
End Sub
Private SubCampoCiudad_Change()
Cells(2,2) = CampoCiudad.Text
End Sub
Private SubCampoNombre_Change()
Cells(1,2) = CampoNombre.Text
End Sub
'2
Private SubBotónEdad_Change()
Edad.Text= BotónEdad.Value
End Sub
Private SubEdad_Change()
2. DimValorEdad1As Integer
ValorEdad1= Val(Edad.Text)
BotónEdad.Value=ValorEdad1
End Sub
Private SubBotónAceptar2_Click()
If CheckBox1.Value=True ThenRange("B1:B3").Font.Bold=True
If BotónHombre.Value =True ThenRange("B3") = "Hombre"
If BotónMujer.Value =True ThenRange("B3") = "Mujer"
If BotónDesconocido.Value =True ThenRange("B3") = "Desconocido"
Range("B4") = BotónEdad.Value
End Sub
'3
Private SubBotónCerrar2_Click()
UnloadFormulario
End Sub
Private SubBotónAceptar3_Click()
Range("B5").Value =ListBox1.ListIndex +1 & "-"& ListBox1.Value
UnloadFormulario
End Sub
Private SubUserForm_Initialize()
WithListBox1
.AddItem"Amarillo"
.AddItem"Verde"
.AddItem"Rojo"
.AddItem"Azul"