Thanks to everyone for your reply.
Just to sum up, it appears there is no performance/ functional difference
VBA-wise, but there are advantages defining a Sub or Function if it's to be
integrated into Excel.
Very useful to know that.
Cheers!
--
Rob van Gelder -
http://www.vangelder.co.nz/excel
"Rob van Gelder" wrote in message
...
Something that I've always been curious about, but never found a real
reason
behind.
Why do we use a Sub instead of using a Function?
Is there any reason other than a Sub returns nothing?
These both do exactly the same thing:
Function Test()
MsgBox "test"
End Function
Sub Test()
MsgBox "test"
End Sub
At the moment my opinion is that Sub is redundant and may as well never be
used.
Thoughts? Comments?
--
Rob van Gelder - http://www.vangelder.co.nz/excel