You are on page 1of 1

EJEMPLO DE PROCEDIMEINTO

Sub AreaT()

Dim Area, Base, Altura As Single

Base = Range("I3").Value

Altura = Range("J3").Value

Area = Base * Altura / 2

Range("K3").Value = Area

End Sub

Sub Calculo_Triangulo()

Call AreaT

MsgBox "Se realizo el Calculo del Area"

MsgBox "Desea calcular de nuevo"

End Sub

EJEMPLO FUNCIONES

Function RaizN(Numero As Double, Indice As Integer) As Double

Dim Raiz As Double

Raiz = Numero ^ (1 / Indice)

RaizN = Raiz

End Function

You might also like