Ok, so here's my code:
Function LMTD(Tha As Double, Thb As Double, Tcb As Double, Tca As Double) As Double
LMTD = ((Thb - Tca) - (Tha - Tcb)) / ((Log((Thb - Tca), 2.718) - Log((Tha - Tcb), 2.718)))
End Function
and I want to put these values in it:
Sub Button2_Click()
Dim z As Double
z = LMTD(100, 75, 80, 60)
msgBox z
End Sub
but it says that there's a compile error "Identifier under cursor is not recognized" and highlights the sub Button2_Click(). I have a command button that I want to print the z value out to but it a. won't put anything on my excel and b. won't run.
Please help!!!!
Bookmarks