0% found this document useful (0 votes)
19 views6 pages

Codigos Visual

Uploaded by

MarcoOliver
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views6 pages

Codigos Visual

Uploaded by

MarcoOliver
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

NUMERO MAYOR DE 5 NUMEROS

Private Sub CommandButton1_Click()

Dim num, may, i, fila As Double

fila = 1

num = Val(TextBox1.Text)

may = num

Cells(fila, 1) = TextBox1.Text

For i = 1 To 4 Step 1

num = InputBox("ingrese un numero")

fila = fila + 1

Cells(fila, 1) = num

If num > may Then

may = num

End If

Next i

TextBox2.Text = may

End Sub

Private Sub CommandButton2_Click()

End Sub

Private Sub CommandButton3_Click()

End

End Sub

Private Sub Label2_Click()

End Sub
HORAS TRABAJADAS DE UN TRABAJADOR

Private Sub CommandButton1_Click()

Dim HT, TH, TI, PB, I, PN As Double

HT = Val(TextBox1.Text)

TH = Val(TextBox2.Text)

TI = Val(TextBox3.Text)

PB = HT * TH

I = PB * TI / 100

PN = PB - I

TextBox4.Text = PB

TextBox5.Text = I

TextBox6.Text = PN

CommandButton2 = SetFocus

End Sub

Private Sub CommandButton2_Click()

TextBox1.Text = ""

TextBox2.Text = ""

TextBox3.Text = ""

TextBox4.Text = ""

TextBox5.Text = ""

TextBox6.Text = ""

TextBox1.Text = SetFocus

End Sub

Private Sub CommandButton3_Click()


End

End Sub

Private Sub UserForm_Click()

End Sub

EDAD DE UNA PERSONA

Private Sub CommandButton1_Click()

Dim edad As Integer

edad = Val(TextBox1.Text)

If edad < 0 Then

TextBox2.Text = "EDAD NEGATIVA NO EXISTE"

Else

If edad > 0 And edad < 13 Then

TextBox2.Text = "NIÑO"

Else

If edad > 12 And edad < 18 Then

TextBox2.Text = "ADOLESCENTE"

Else

If edad > 17 And edad < 31 Then

TextBox2.Text = "JOVEN"

Else

If edad > 30 And edad < 65 Then

TextBox2.Text = "ADULTO"

Else

If edad > 64 Then

TextBox2.Text = "TERCERA EDAD"


Else

TextBox2.Text = "TERCERA EDAD"

End If

End If

End If

End If

End If

End If

TextBox1.Enabled = False

End Sub

Private Sub CommandButton2_Click()

TextBox1.Enabled = True

TextBox1.Text = ""

TextBox1.SetFocus

TextBox2.Text = ""

End Sub

Private Sub CommandButton3_Click()

End

End Sub

CANTIDAD DE LADRILLOS

Private Sub CommandButton1_Click()

Dim CL, L, H, JH, JV As Double

L = Val(TextBox1.Text)

H = Val(TextBox2.Text)
JH = Val(TextBox3.Text)

JV = Val(TextBox4.Text)

CL = 1 / ((L + JH) * (H + JV))

TextBox5.Text = Round(CL, 2)

End Sub

Private Sub CommandButton2_Click()

TextBox1.Text = ""

TextBox2.Text = ""

TextBox3.Text = ""

TextBox4.Text = ""

TextBox5.Text = ""

End Sub

Private Sub CommandButton3_Click()

Unload Me

End Sub

Private Sub Label2_Click()

End Sub

Private Sub Label4_Click()

End Sub

Private Sub Label5_Click()

End Sub
Private Sub UserForm_Click()

End Sub

You might also like