You are on page 1of 1

Guia 3, ejercicio 1.

Private Sub Area_Click()


Dim r As Single, A As Single
If Not IsNumeric(radio.Text) Then
MsgBox "DATO NO VALIDO"
Else
If (radio.Text <= 0) Then
MsgBox "DATO NO VALIDO"
Else
r = radio.Text
A = 4 * 3.14 * Val(r) ^ 2
v = 4 / 3 * 3.14 * Val(r) ^ 3
respuesta.Caption = "El area es " & A & " y el volumen es " & v
End If
End If
End Sub
Private Sub Volumen_Click()
Guia_3_1.Hide
Guia_3.Show
End Sub

You might also like