Dim str Set object = GetObject("winmgmts:") Set os = object.ExecQuery("SELECT * FROM Win32_OperatingSystem") For Each obj In os str = "System Version:" & obj.Version & Chr(13) next MsgBox str