Detect OS Type

Used to detect if OS Type is Windows or macOS

Sub GetOSType()
    'Get the OS that I am running from
    Dim OSType      As String
    OSType = Application.OperatingSystem
    If OSType Like "*Windows*" Then
        OSType = "Windows"
    Else
        If OSType Like "*Macintosh*" Then
            OSType = "macOS"
        End If
    End If
    'Message box of the detected OS
    MsgBox OSType
End Sub

Revision #1
Created 11 April 2022 09:42:26 by Nicholas Goh
Updated 11 April 2022 09:45:10 by Nicholas Goh