Just as an example, say I’d like to reference a msgbox in multiple areas, could I create a function for this? Private or Public? Differences?
Here’s an example.
Public Function Message() As String
MsgBox("Test Message")
End Function
Also, why would I get the following message: Function 'Message' doesn't return a value on all code paths. A null reference exception could occur at run time when the result is used
It seems as though its just a warning and it seemed to work when I called the function.
Make it
Subso it’s not expecting a return value.