I have a need to determine if the user's installed version of Excel will support specific features. Upon opening a workbook, I am trying to collect information ...
I am using the following in a macro that runs when the user opens the workbook ...
When I run the macro, I get the following results:
Application.Application = Microsoft Excel
Application.Version = 16.0
Application.Build = 18324
Application.ProductCode = {90160000-000F-0000-1000-0000000FF1CE}
Application.OperatingSystem = Windows (64-bit) NT 10.00
I am hoping to be able differentiate between Excel 2016, 2019, 2021, 2024 and 365. But all these have Application.Version = 16.0
Looking into the build numbers and I am finding similar problems. That is, I cannot find a reference of build numbers that differentiate between Excel's. Perhaps there is such a thing, but I cannot find them. Lastly, my PC is running Windows 11, but Application.OperatingSystem yields the result shown above.
Does anyone have a solution on how I can perform the query upon opening an Excel Workbook to obtain the details I am looking for?
Thanks,
Steve
- The Excel Version number
- The Excel Product Code
- The Excel Build Number
- The Operating System identifier
I am using the following in a macro that runs when the user opens the workbook ...
Rich (BB code):
Sub checkexcel()
Dim excelname as String
Dim excelVersion As StringDim excelBuild As StringDim excelProductCode As StringDim osp As String
excelname = Application.Application
excelVersion = Application.Version excelBuild = Application.Build
excelProductCode = Application.productCode
osp = Application.OperatingSystem
end sub
When I run the macro, I get the following results:
Application.Application = Microsoft Excel
Application.Version = 16.0
Application.Build = 18324
Application.ProductCode = {90160000-000F-0000-1000-0000000FF1CE}
Application.OperatingSystem = Windows (64-bit) NT 10.00
I am hoping to be able differentiate between Excel 2016, 2019, 2021, 2024 and 365. But all these have Application.Version = 16.0
Looking into the build numbers and I am finding similar problems. That is, I cannot find a reference of build numbers that differentiate between Excel's. Perhaps there is such a thing, but I cannot find them. Lastly, my PC is running Windows 11, but Application.OperatingSystem yields the result shown above.
Does anyone have a solution on how I can perform the query upon opening an Excel Workbook to obtain the details I am looking for?
Thanks,
Steve
Last edited by a moderator: