vba Excel中的办公版本和操作系统错误
我正在使用 Windows 11 在 VBA Excel 365 中运行此代码
Sub test()
Dim sBuild As String, sOP As String, sVersion As String
sBuild = Application.Build
sOP = Application.OperatingSystem
sVersion = Application.Version
MsgBox "Operating System " & sOP & " with Office version " & sVersion & " Build " & sBuild
End Sub
但是,我收到此消息“操作系统 Windows(64 位)NT 10.00 和 Office 版本 16.0 Build 15028”
属性 Application.Version 和 Application.OperatingSystem 显示的结果与如果我在 Excel 2016 中运行并使用 Windows 10。
有什么建议可以获取真正的 Office 和 Windows 版本吗?
谢谢。
曼努埃尔
I am running this code in VBA Excel 365 using Windows 11
Sub test()
Dim sBuild As String, sOP As String, sVersion As String
sBuild = Application.Build
sOP = Application.OperatingSystem
sVersion = Application.Version
MsgBox "Operating System " & sOP & " with Office version " & sVersion & " Build " & sBuild
End Sub
However, I get this message "Operating System Windows (64-bit) NT 10.00 with Office version 16.0 Build 15028"
The properties Application.Version and Application.OperatingSystem shows the same results as if I was running in Excel 2016 and using Windows 10.
Any suggestion to get the real Office and Windows version?
Thank you.
Manuel
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
上面的评论中的此链接可以很好地适用于办公室(检查现代办公室中的应用程序)。
我将其用于Windows:
This link in the comment above works fine for Office (Check the application version in modern office).
I use this for Windows: