MatemáticasBásico1 respuestas

Realizar un programa en vba que te calcule el volumen de un cilindro?

Realizar un programa en vba que te calcule el volumen de un cilindro.

3Manimayor12

En resumen

Dim num1, num2, resp As Double Const pi As Double = 3. 1416 Private Sub Command1_Click() resp = 2 * pi * num1 * (num1 * num2) Text3. Text = resp End Sub Private Sub Command2_Click() resp = pi * num1 * num1 * num2 Text4. Text = resp End Sub Private Sub Command3_Click() Text1.

Mejor respuesta

HipercubesHunter11

1

Dim num1, num2, resp As Double

Const pi As Double = 3.

1416

Private Sub Command1_Click()

resp = 2 * pi * num1 * (num1 * num2)

Text3.

Text = resp

End Sub

Private Sub Command2_Click()

resp = pi * num1 * num1 * num2

Text4.

Text = resp

End Sub

Private Sub Command3_Click()

Text1.

Text = " "

Text2.

Text = " "

Text3.

Text = " "

Text4.

Text = " "

Text1.

SetFocus

End Sub

Private Sub Command4_Click()

End

End Sub

Private Sub Text1_Change()

If Text1.

Text " " Then

num1 = Val(Text1.

Text)

End If

End Sub

Private Sub Text2_Change()

If Text2.

Text " " Then

num2 = Val(Text2.

Text)

End If

End Sub.