Simple Layup for anyone. I've written a function isMac() which looks at the current operating System, if the first 3 letters are Mac, it is supposed to return True. I then want to assign the return value of the function to a variable in another function. I'm currently running a Mac, so when I run the following code, the MsgBox says True, while the Debug.Print returns False
Function isMac() As Boolean
If Left(Application.OperatingSystem, 3) = "Mac" Then
result = True
Else
result = False
End If
MsgBox result
End Function
Sub test()
Debug.Print isMac()
End Sub
How do I correctly return a Boolean from my IF statement so that I can utilize it in another function?