"Andreas Schittlipz" <an*****@schittlipz.com> wrote in message
news:bq**********@hercules.btinternet.com...
Hallo Newsgroup!
I am wanting to write a function using VBA - but I don't know why.
Please can someone help?
Simple example in a standard module...
Public Function AddTwoNumbers(FirstNum As Double, SecondNum As Double) As
Double
AddTwoNumbers = FirstNum + SecondNum
End Function
Testing in the Immediate pane of the debug window...
?AddTwoNumbers(12.5, 6.25) <Enter>
18.75
Of course for more complex functions you would also need error handling and
proper house cleaning code if you open any objects, etc..
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com