Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Rob
one difference between sub and functions: Function can not change the Excel environment. That is they can't change formats, other cells, etc. Only subs can do this. Also have a look at http://www.cpearson.com/excel/differen.htm -- Regards Frank Kabel Frankfurt, Germany Rob van Gelder wrote: 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? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
copy of excel file not showing formulal/function in the function b | Excel Discussion (Misc queries) | |||
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) | Excel Worksheet Functions | |||
Offset function with nested match function not finding host ss. | Excel Worksheet Functions | |||
Emulate Index/Match combo function w/ VBA custom function | Excel Worksheet Functions | |||
Adding a custom function to the default excel function list | Excel Programming |