Você está na página 1de 2

Carlos Henrique de Moura

3º Informática

Matéria: Analise de Sistemas

Introdução
Descrição do programa para cálculo do IMC

Desenvolvimento
-Abrir o Excel
-Exibição, Macro, Exibir Macros
Digitar algo -> criar
Clicar no botão inserir UserForm

Inserir UserForm

Programa para calcular o IMC e apresentar a foto da Pessoa

obeso.Visible = False
magrinha.Visible = False
NORMAL.Visible = False
palito.Visible = False
esqueleto.Visible = False
fofinha.Visible = False
normal2.Visible = False

If peso = "" Or altura = "" Then


MsgBox "Digita Cabeção", vbCritical, "Aviso"
Exit Sub
End If

imc = peso / altura ^ 2


If imc < 19 Then
If homem.Value = True Then resultado = "Resultado: Você está muito magro cabeção"
If homem.Value = True Then esqueleto.Visible = True
If mulher.Value = True Then resultado = "Resultado: Você está Magrissima, perfeita, como a
Aline lindinha da enfermagem"
If mulher.Value = True Then palito.Visible = True
ElseIf imc < 25 Then
If homem.Value = True Then resultado = "Resultado: Você está no peso ideal"
If mulher.Value = True Then resultado = "Resultado: Cuidado, não respire!!! Está perfeita!!!"
If homem.Value = True Then NORMAL.Visible = True
If mulher.Value = True Then normal2.Visible = True

ElseIf imc < 30 Then


If homem.Value = True Then resultado = "Resultado: Você está com sobrepeso Cabeção"
If mulher.Value = True Then resultado = "Resultado: Você está com sobrepeso Cabeção"
If homem.Value = True Then obeso.Visible = True
If mulher.Value = True Then fofinha.Visible = True

ElseIf imc < 40 Then


If homem.Value = True Then resultado = "Resultado: Você está levemente obeso, porém
pesado"
If mulher.Value = True Then resultado = "Resultado: Você está levemente obesa, porém
pesada"
If homem.Value = True Then obeso.Visible = True
If mulher.Value = True Then fofinha.Visible = True
ElseIf imc > 40 Then
If homem.Value = True Then resultado = "Resultado: Você está Mórbidamente Obeso
Cabeção"
If mulher.Value = True Then resultado = "Resultado: Você está Mórbidamente Obesa
Fofuxa"
If homem.Value = True Then obeso.Visible = True
If mulher.Value = True Then fofinha.Visible = True
End If

Resultado

Você também pode gostar