XL5: Application.OperatingSystem Returns Incorrect ValueLast reviewed: September 2, 1997Article ID: Q111710 |
The information in this article applies to:
SYMPTOMSIn Microsoft Excel 5.0 for Windows, the OperatingSystem property of the Application object returns the name and version number of the current operating system. Depending on the operating system you are using, this property may return incorrect results.
Operating System OperatingSystem Property Returns -------------------------------------------------------------- Microsoft Windows for 3.10 Workgroups version 3.11 Microsoft Windows 95 Windows 3.95 Microsoft Windows NT 3.51 Windows 3.10. ExampleWhen you run the following Visual Basic procedure to display the current operating system in a dialog box, Microsoft Windows version 3.11 will be incorrectly identified as version 3.10. It will be referred to as Windows 3.95 under Microsoft Windows 95, and Windows 3.10 under Microsoft Windows NT.
Sub ShowOS() Msgbox Application.OperatingSystem End Sub CAUSEMicrosoft Excel 5.0 for Windows uses a GetVersion Windows application programming interface (API) call that returns version 3.10 from the kernel. The version that the kernel reports was not changed for this version of Microsoft Windows for Workgroups. Because Microsoft Excel version 5.0 was designed for a 16-bit operating system, GetVersion makes a 16-bit .dll call that returns invalid data under a 32-bit operating system.
STATUSMicrosoft has confirmed this to be a problem in Microsoft Excel version 5.0. This problem was corrected in Microsoft Excel for Windows 95, version 7.0.
MORE INFORMATIONFor additional information on running 16-bit versus 32-bit Microsoft Excel, please see the following article(s) in the Microsoft Knowledge Base:
ARTICLE-ID: Q136147 TITLE : VB Macro to Tell If You Are Running 16-bit or 32-bit MS Excel ARTICLE-ID: Q131525 TITLE : Can't Run Macro That Calls 16-bit DLL in 32-bit MS Excel REFERENCESMicrosoft Press: "Excel 5 Visual Basic for Applications Reference," page 460
|
Additional query words: 5.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |