Scope

By default all functions (and subroutines) are public which means they can be called by code in ANY other code modules.
For clarity it is often good to prefix your function with the word "Public"

Public Function MyFunction() 
End Sub

Function MyFunction()
End Sub

Private functions can only be called from within the SAME module.

Private Function MyFunction() 

End Sub

Any functions will not appear in the (Tools > Macro > Macros) dialog box.



© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext