Scope
By default all subroutines (and functions) are public which means they can be called by code in ANY other code modules.
For clarity it is often good to prefix your subroutines with the word "Public"
Public Sub MySubroutine()
End Sub
Sub MySubroutine()
End Sub
Private procedures can only be called from within the SAME module.
Private Sub MySubroutine()
End Sub
Any subroutine that has a Private scope will not appear in the (Tools > Macro > Macros) dialog box.
© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext