'The below code snippet would work only if you call the subprocedure ConvertTemp() at the end.
Sub ConvertTemp()
temp = InputBox("Please enter the temperature in degrees F.", 1)
MsgBox "The temperature is " &;; Celsius(temp) &;; " degrees C."
End Sub
'function returns a value
Function Celsius(fDegrees)
Celsius = (fDegrees - 32) * 5 / 9
End Function
ConvertTemp()