Professional Documents
Culture Documents
If Then End If Select Case Case
If Then End If Select Case Case
x = 1
End If
Select Case x
Case 1
txtverde.BackColor = Color.Green
txtred.BackColor = Color.Red
red.BackColor = Color.Red
rojo.BackColor = Color.Red
Case 2
txtamarillo.BackColor = Color.Yellow
Case 3
txtverde.BackColor = Color.White
Case 4
txtrojo.BackColor = Color.Red
txtyellow.BackColor = Color.Yellow
txtamarillo.BackColor = Color.White
Case 5
txtred.BackColor = Color.White
Case 6
txtgreen.BackColor = Color.Green
txtyellow.BackColor = Color.White
Case 7
txtyellow.BackColor = Color.Yellow
Case 8
txtgreen.BackColor = Color.White
Case 9
txtred.BackColor = Color.Red
txtyellow.BackColor = Color.White
amarillo.BackColor = Color.Yellow
Case 10
rojo.BackColor = Color.White
Case 11
verde.BackColor = Color.Green
amarillo.BackColor = Color.White
Case 12
amarillo.BackColor = Color.Yellow
Case 13
verde.BackColor = Color.White
Case 14
rojo.BackColor = Color.Red
amarillo.BackColor = Color.White
yellow.BackColor = Color.Yellow
Case 15
red.BackColor = Color.White
Case 16
green.BackColor = Color.Green
yellow.BackColor = Color.White
Case 17
yellow.BackColor = Color.Yellow
Case 18
green.BackColor = Color.White
Case 19
red.BackColor = Color.Red
yellow.BackColor = Color.White
txtamarillo.BackColor = Color.Yellow
Case 20
txtrojo.BackColor = Color.White
Case 21
txtverde.BackColor = Color.Green
txtamarillo.BackColor = Color.White
End Select
declaracion de variables
Dim variablea As Integer
Dim variableb As Integer
Dim variablec As Integer
Dim nmenor As Integer
Dim nmayor As Integer
'proceso
variablea = InputBox("ingrese valor 1 ")
variableb = InputBox("ingrese valor 2 ")
variablec = InputBox("ingrese valor 3 ")
'salida de la informacion
txtaños.Text = años
txtmeses.Text = meses
txtsemanas.Text = semanas
txtdias.Text = dias
End Sub
Private Sub btnnuevo1_Click(sender As Object, e As EventArgs) Handles btnnuevo1.Click
txtndias.Clear()
txtaños.Clear()
txtmeses.Clear()
txtsemanas.Clear()
txtdias.Clear()
End Sub
'entrada de datos
valor = Val(txtvalor.Text)
'proceso
Do While valor >= 50000
cincuenta = 1
valor = valor - 50000
Do While valor >= 50000
cincuenta = cincuenta + 1
valor = valor - 50000
Loop
Loop
Do While valor >= 20000
veinte = veinte + 1
valor = valor - 20000
Do While valor >= 20000
veinte = veinte + 1
valor = valor - 20000
Loop
Loop
Do While valor >= 10000
diez = diez + 1
valor = valor - 10000
Do While valor >= 10000
diez = diez + 1
valor = valor - 10000
Loop
Loop
Do While valor >= 5000
cinco = cinco + 1
valor = valor - 5000
Do While valor >= 5000
cinco = cinco + 1
valor = valor - 5000
Loop
Loop
Do While valor >= 1000
uno = uno + 1
valor = valor - 1000
Do While valor >= 1000
uno = uno + 1
valor = valor - 1000
Loop
Loop
resto = valor
'salida de la informacion
txt50.Text = cincuenta
txt20.Text = veinte
txt10.Text = diez
txt5.Text = cinco
txt1.Text = uno
txtr.Text = resto
End Sub