I have a boolean function “Test” in Module1, for example:
Function Test() As Boolean
MsgBox "Testing"
End Function
Now even after successfully executing it, I receive a False. Why is that?
If Module1.Test = True Then
MsgBox "True"
ElseIf Module1.Test = False Then
MsgBox "False"
End If
Thanks in advance
Because
Falseis the default return value if you don’t explicitly specify something else, it will always returnFalse.To change that, you need to place these statements where appropriate within the function: