Thread: Sub vs Function
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
NicoB NicoB is offline
external usenet poster
 
Posts: 8
Default Sub vs Function

Sub has no return value whereas Function can return object or variable. You must decide to use Sub or Function according to what you want to do
Valid déclaration of function :
Function Test() AS boolea
'test a value, check something or do a calculatio
Test = True 'return your test or calculatio
End Function