New excel application version

Is Excel 2019 just Excel 2016 with a new name?

Excel developers can use the command «Application.Version» to get the version of Excel.
However, the new Excel 2019 returns the same version number as Excel 2016 (16.0).
We expected Excel 2019 to return the number 17.0 (or 19.0) but certainly not 16.0.

We recently purchased and installed the new Office 2019 in order to (successfully) test ASAP Utilities with it.
To our surprise, we noticed that the new Excel 2019 internally still shows the number 16 as the version and not a higher number such as 17 or 19.
The command «Application.Version», returns 16,0 for both Excel 2016 and the new Excel 2019.
And the command «Application.Build», also returns the exact same number when the latest updates are installed.
Upon further research, we noticed that the detailed version numbers, via «File > Account > About Excel» are also exactly the same for Excel 2016 and 2019:

Excel 2019 with latest updates on October 5th, 2018 shows: 16.0.10827.20118

Excel 2016 with latest updates on October 5th, 2018 shows 16.0.10827.20118:

Via File > Account, Office 2019, shows:
Version 1809 (Build 10827.20138 Click-to-Run)

Via File > Account, Office 2016, shows the exact same version as Office 2019:
Version 1809 (Build 10827.20138 Click-to-Run)

In the «Programs and Features» section in the Windows Control Panel, the version number of Office 2019 is also 16.0…

Has Microsoft forgotten to update the internal version number in Excel 2019?

Based on the detailed version numbers (16.0.10827.20118), it seems as if Excel 2016 with the latest updates is exactly the same as the new launched Excel 2019. Although we did notice that Excel 2016 with the latest updates is missing some features that are new in Excel 2019, such as funnel charts.

This makes us wonder if Microsoft has forgotten to update the internal version number of Excel from 16.0 to 17.0?

Update January 17, 2020; Microsoft: The major version of Office 2019 is staying at 16.0

We now know officially that Microsoft decided to keep the major Excel version number for Excel 2019 the same as for Excel 2016 on purpose (which I still find a strange decision).

Microsoft: The major version of Office 2019 is staying at 16.0, so some additional things are staying the same for those upgrading from Office 2016, including the following:

  • Existing Group Policy settings will continue to work, because the registry location for those settings will still be located in HKEY_LOCAL_MACHINESOFTWAREPoliciesMicrosoftOffice16.0 and HKEY_CURRENT_USERSOFTWAREPoliciesMicrosoftOffice16.0.
  • Other registry locations and settings information that reference 16.0 will still apply.
  • Add-ins and other extensibility solutions that are compatible with Office 2016 will most likely be compatible with Office 2019 or will require only minimal testing.

Source:  https://docs.microsoft.com/en-us/deployoffice/office2019/overview



  • Excel 365


  • Excel 2021


  • Excel 2019


  • Excel 2016




  • February 12, 2022



  • 4 Comments

It’s important to know which version of Excel you are using

There have been 30 different versions of Excel, stretching from 1985 to the present day.  These days most users today will have Excel 2016, 2019, 2021 or 365.

Each version of Excel has been significantly different to the last, and the Mac and Windows versions are still very different today. If you need to learn Excel we strongly recommend that you learn using Excel 365 rather than one of the legacy versions.  In this article you’ll find out why.30

Table of Contents

Excel 365
Excel 2021
Excel 2019
Excel 2016 and 365
Excel 2013 (Windows)
Excel 2011 (Mac)
Excel 2010 (Windows)
Excel 2008 (Mac)
Excel 2007 (Windows)
Excel 2004 (Mac)
Excel 2003 (Windows)
Older Windows versions (2002, 2000, 97, 95, 4.0, 3.0, 2.0)
Older Mac versions (2001, 2000, 98, 5, 4, 3, 2, 1)
OS/2 Versions (2.2, 2.3, 3)

Excel 365

Excel 365 is planned to have an infinite life.  Instead of the old 3-year update cycle, 365 is a constantly evolving product with new features arriving as each new version is released.

Because business users don’t want constant change (and need rock-solid reliable releases) Microsoft introduced the concept of “update channels” for Office 365.  Large corporate users can opt in to a six-monthly update channel.  This provided a solid and tested “Semi-annual” version  in January and July each year.  The Smart Method supports the ever-changing nature of Office 365 by publishing a new version of our books every time significant new features are added.  At the time of writing this article (in February 2022) we’d recently published the sixth edition covering the January 2022 current update.  The Smart Method is the only publisher that does this to keep our books up to date.

There have been some amazing features added to Excel 365 since 2019 but absolutely nothing compares to the introduction of Dynamic Arrays and Dynamic Array functions in the July 2020 release.  This is not a trivial change.  The Excel engine had to be completely re-engineered to recognize the new dynamic array concept.  2021 saw the introduction of Automatic Data Analysis and Natural Language Queries (features that were not included in the Excel 2021 release).  Linked data types have also been hugely expanded (once again a 365-only feature).  We’ve also found some great applications for Custom Data Types (another feature introduced very recently) and (in the 2021 and 365 Expert Skills books) share our implementation of multi-lingual forms and reports that can now be created really easily using this new feature.

In Excel 365 a huge number of older Excel functions can now work in an entirely new way and some old favourites have been replaced by modern array-aware functions.  For example VLOOKUP has been replaced by XLOOKUP (a modern array function that is more versatile, easier to use and more powerful).

The new dynamic array capability took Excel 365 into a different league to Excel 2019.  Dynamic arrays are fundamentally incompatible with Excel 2019 and will result in modern workbooks (created with Excel 365) not working as expected in legacy versions.  Excel 2021 doesn’t have this problem as it supports dynamic arrays.

Excel 365 is the latest, greatest and most powerful Excel version you can use and it is available for a very modest monthly subscription.

Excel 2021

Many commentators speculated that there would never be an Excel 2021 but they were wrong for a second time.

It does seem strange to release yet another “perpetual licence” version of Office that would be sold alongside Excel 365.  

It is clear that Microsoft have completely embraced the SaaS (software as a service) model where software is rented and not sold.  They seem to have also acknowledged that there are some purchasers that still prefer the “buy once use forever” model.  

Many commentators are now speculating, once again, that Excel 2021 really is the last in the line of perpetual licensed versions.  The current Excel 2021 version is already hugely behind Excel 365 with the “killer features” of linked data types, automatic analysis and Natural Language Queries only available to Excel 365 users as no new features will ever be added to Excel 2021.

The huge upgrade for Excel 2021 was the inclusion of the dynamic arrays along with a suite of new dynamic array functions.  Our Excel 2021 books were published in February 2022. 

Excel 2019

Many commentators speculated that there would never be an Excel 2019.

Microsoft kept us guessing right up to the last minute before announcing that there would indeed be another “perpetual licence” version of Office that would be sold alongside Excel 365.  

It is clear that Microsoft have completely embraced the SaaS (software as a service) model where software is rented and not sold.  They seem to have also acknowledged that there are some purchasers that still prefer the “buy once use forever” model.  

Many commentators are now speculating that Excel 2019 really is the last in the line of perpetual licensed versions.  The current Excel 2019 version is already hugely behind Excel 365 with the “killer feature” of dynamic arrays only available to Excel 365 users as no new features will every be added to Excel 2019.

The huge upgrade for Excel 2019 was the inclusion of the “power” tools: Power Pivot, Power Query (Get & Transform) and Power Maps (3-D Maps) in all versions.  These are very high-level OLAP tools that allow Excel to analyse “big data” and add the ability to perform “modern data analysis” with any Excel version.   Having said this the “power” tools have further evolved since Excel 2019 was released making extra “power” features available only to Excel 365 users. 

Excel 2016 and Excel 2016 for Office 365 subscribers

Excel 2016 was very different to previous versions of Excel for two reasons:

  • The Mac and Windows versions were both called “Excel 2016”, even though they are very different (previous versions used different year numbers to avoid confusion).
  • If you were an Office 365 customer, you received updates via the Internet that made your copy of “Excel 2016” very different from that of a non-365 user.

This was a difficult Excel version to support with learning materials as we had to issue continuous revisions of our Excel 2016 book to cater for both Excel 2016 and Excel 2016 for Office 365 subscribers.  During the life of the product the two versions moved very far apart from each other.

It was a great relief for The Smart Method when Excel 2019 and Excel 365 were clearly named as different versions in the releases that followed.

Excel 2016 and Excel 365 for Windows

With Excel 2016, Microsoft began to release regular feature updates via the internet instead of only adding new features when an entirely new version is released. These new features were only provided to Office 365 subscribers, so users with boxed retail copies had a very different version of Excel to Office 365 users.

Our books were regularly updated to explain any differences between the Office 365 version and the boxed retail versions of Excel. 

Excel 2016 for Mac

With Excel 2016, Microsoft decided to give the Mac and Windows versions the same name for the first time since the year 2000. Despite this, the two programs are still quite different, owing partly to the different user interface of the iOS operating system.

You can see a list of the differences between the Mac and Windows versions of Excel 2016 here.

Like the Windows version, Microsoft also release feature updates for Excel 2016 for Mac via the internet and our courses are regularly updated to explain any differences. If you have Excel 2016 for Mac you should use the Mac version of our courses.

Excel 2013 (Windows)

Excel 2013 was only released for Windows computers, and introduced the new Flash Fill feature, Slicers, and 50 new functions.

If you need to learn Excel 2013, you should use our Excel 2013 course available as both a book or e-book.

Excel 2011 (Mac)

Excel 2011 was only released for Apple Mac computers. It was the last version of Excel for Mac that had a separate name to its Windows counterpart.

Like Excel 2010 for Windows, this was also the 13th version of Excel for Mac, but version 13 was skipped for superstitious reasons and Excel 2011 was declared to be version 14.

We don’t offer a course for Excel 2011, but we do offer a complete course for Excel 2016 for Mac. If you want to use our courses to learn on an Apple Mac computer, you should upgrade to Excel 2016 first.

Excel 2010 (Windows)

Excel 2010 was only released for Windows computers. It introduced several new features, including multi-threading support, sparklines, Ribbon customization and the back-stage view.

Although Excel 2010 was actually the 13th version of Excel, Microsoft skipped version 13 and officially declared it as version 14, entirely because 13 is considered an unlucky number!

If you need to learn Excel 2010, our Excel 2010 books and e-books are still available but we strongly advise you not to use this version as Microsoft no longer provide security patches meaning that a hacker could compromise your computer if a back-door into Office 2010 is discovered.

Excel 2008 (Mac)

Excel 2008 was only released for Apple Mac computers.

We don’t offer a course for Excel 2008, but we do offer a complete course for Excel 2016 and Excel 2019 for Mac. If you want to use our courses to learn on an Apple Mac computer, you should upgrade to Excel 2019 first.

Excel 2007 (Windows)

Excel 2007 was only released for Windows computers.

Excel 2007 was a significant leap forward from earlier versions, introducing the new Ribbon interface and changing the file format from the familiar .xls to the new .xlsx and .xlsm files. This change meant that Excel files could store over 1 million rows (when they were previously limited to 16,384) and vastly improved security. Excel’s charting features were also greatly improved in this version.

Surveys at the time showed that the majority of users didn’t like the new interface, but Microsoft persisted with the Ribbon and most users now probably wouldn’t want to go back!

If you need to learn Excel 2007, our Excel 2007 books and e-books are still available but we strongly advise you not to use this version as Microsoft no longer provide security patches meaning that a hacker could compromise your computer if a back-door into Office 2007 is discovered.

Excel 2004 (Mac)

Excel 2004 was only released for Apple Mac computers.

We don’t offer a course for Excel 2004, but we do offer a complete course for Excel 2016 and Excel 2019 for Mac. If you want to use our courses to learn on an Apple Mac computer, you should upgrade to Excel 2019 first.

Excel 2003 (Windows)

Excel 2003 was the final version of Excel to use the old ‘WIMP’ interface, which stands for “Windows, Icons, Menus, Pointer”. If you used it, you might remember the drop-down menus and icons at the top of the screen.

Excel 2003 was also the first version of Excel to include the Tables feature, although it was much improved upon later.

We don’t offer a course for Excel 2003, but we do offer courses for all Excel versions that are currently supported by Microsoft. If you are using Excel 2003 you should upgrade to a more recent version to learn Excel.

Older Windows versions (2002, 2000, 97, 95, 4.0, 3.0, 2.0)

Earlier versions of Excel stretch all the way back to Excel 2.0, which was released in 1987. Some of the most familiar features of Excel date back surprisingly far!

AutoFill was first introduced in Excel 4.0, which was released in 1992.

VBA and Macros date back to Excel 5.0, which was released in 1993. The flexibility of VBA meant that Excel became a significant target of macro viruses until Excel 2007 revamped the file formats to improve security.

The Office Assistant “Clippy” was introduced in Excel 97, but most users found it extremely annoying! It was switched off by default in Excel 2002 and removed entirely as of Excel 2007.

If you’re using a very old version of Excel it’s definitely time to upgrade! Our courses can help you get up to speed with any of the more recent versions of Excel.

Older Mac versions (2001, 2000, 98, 5, 4, 3, 2, 1)

It’s a little-known fact that the very first version of Excel was only released on the Mac, although Microsoft had an even earlier spreadsheet product called Multiplan, which was used on MS-DOS and other console-based operating systems.

The first Windows version of Excel was actually a port of the Mac “Excel 2”.

While Microsoft have recently released Excel 2019 for Windows and Excel 2019 for Mac under exactly the same name, they have actually done this before with Excel 2000, which was released for both Mac and Windows.

If you’re using a very old version of Excel for Mac it’s definitely time to upgrade! Our Excel 2019 for Mac courses can teach you everything you need to know to use the most recent versions of Excel.

OS/2 Versions (2.2, 2.3, 3)

OS/2 was an operating system developed by Microsoft and IBM in 1985. It was taken over by IBM exclusively in 1992, but three versions of Excel were released for OS/2 in the meantime.

These are the only up-to-date Excel books currently published and includes the new Dynamic Arrays features.

They are also the only books that will teach you absolutely every Excel skill including Power Pivot, OLAP and DAX.

Some of the things you will learn

Covered in Session 12 – Power Pivot, Data Modelling, OLAP and Business Intelligence

Covered in Lesson 12-20: Use the CUBEVALUE function to query a data model.

Covered in Session 13: An Introduction to DAX

Covered in Lesson 12-6: Use an OLAP pivot table to analysze data residing in a data model.

Covered in Lesson 11-33 Create a merged query using fuzzy logic.

Covered in Session 10: 3D Maps.

Covered in Lesson 11-7: Create and use a custom data type.

Covered in Lesson 9-2: Use Natural Language Queries.

Covered in Lesson 11-8: Use custom data types in formulas.

Covered in Lesson 9-1: Use automatic data analysis to create data insights.

Share this article

Recent Articles

4 Responses

  1. Thank you! Very helpful ! I still want to know what the heck “Slicers” are, and what’s the hubbub – why they’re so great – if they ARE great!

    1. Hi Steve,

      Slicers are interactive buttons that let you quickly and easily filter tables and pivot tables. They’re particularly useful for dashboards but they can help to make almost any spreadsheet more user friendly. They make very impressive-looking interfaces, so I’d say they are pretty great!

  2. If I save tabels as Excel.workbook I am unable to open from the directory. I have to open Excel to open the file. If I safe it under Excel97-2008.workbook I have no problem accessing it from my directory

    1. Hi Piet

      This is caused by your file associations becoming corrupt. Your computer recognizes the old .XLS file extension but does not associate the modern .XLSX file extension. You can easily reset this like this:

      1. Open Windows Explorer.
      2. Find an .XLSX file and right-click it.
      3. Select «Open With…» from the shortcut menu.
      4. Select Excel.
      5. Check the «Always use this app to open .XLSX files».

Leave a Reply




  • 2019-02-11




  • Ken Puls




  • Categories:

    Excel, VBA

In the good old days, it was easy to check the application version in Office with VBA.  You just used a little test of Val(Application.Version) to return the number.  12 was Office 2007, 14 was Office 2010, 15 was Office 2013, and 16 was Office 2016.  But then Office 365 came out, and 2019, and things fell apart.

Conducting a check of the application version in Modern Office is not as straight forward.  From Office 2016 onwards, Microsoft has not revved the Application.Version number — they all show as 16.0 — giving you no way to differentiate between versions.  (Bastien discusses this in a blog post a few months ago.) But worse, while he focuses on 2016 vs 2019, there is also no way to test between these and Office 365 subscription versions.  As there are now things that work differently for Office 365 than the perpetual licenses, this is another potential problem for developers.

This past week I ran into a scenario where I needed to do exactly this.  I needed to find a way to programatically enumerate whether a user is running Office 2016, Office 2019 or Office 365, as I had to do something different in each case.

So how can we check the application version in modern Office?

After doing a little digging, I finally found a registry key that seems to appear in Office 2019 and Office 365, but does not exist in Office 2016.  So that was good news. And even better, that key holds values like «O365ProPlusRetail» vs «Office2019ProfessionalPlus».  While I haven’t tested with other SKUs, this would seem to indicate a pattern I hope we can rely on.

Given that, I’ve pulled together this function.  It’s purpose is fairly simple: Test the application and see if it is a perpetual license or a subscription install, and return the version number.  So anyone with Office 365 installed should receive 365 as a return, otherwise you’ll get a four digit number representing the version you have installed.

Function to check the application version in Modern Office

Function AppVersion() As Long
'Test the Office application version
'Written by Ken Puls (www.excelguru.ca)

Dim registryObject As Object
Dim rootDirectory As String
Dim keyPath As String
Dim arrEntryNames As Variant
Dim arrValueTypes As Variant
Dim x As Long

Select Case Val(Application.Version)
Case Is = 16
'Check for existence of Licensing key
keyPath = "SoftwareMicrosoftOffice" & CStr(Application.Version) & "CommonLicensingLicensingNext"
rootDirectory = "."
Set registryObject = GetObject("winmgmts:{impersonationLevel=impersonate}!\" & rootDirectory & "rootdefault:StdRegProv")
registryObject.EnumValues &H80000001, keyPath, arrEntryNames, arrValueTypes

On Error GoTo ErrorExit
For x = 0 To UBound(arrEntryNames)
If InStr(arrEntryNames(x), "365") > 0 Then
AppVersion = 365
Exit Function
End If
If InStr(arrEntryNames(x), "2019") > 0 Then
AppVersion = 2019
Exit Function
End If
If InStr(arrEntryNames(x), "2021") > 0 Then
AppVersion = 2021
Exit Function
End If
Next x
Case Is = 15
AppVersion = 2013
Case Is = 14
AppVersion = 2010
Case Is = 12
AppVersion = 2007
Case Else
'Too old to bother with
AppVersion = 0
End Select

Exit Function

ErrorExit:
'Version 16, but no licensing key. Must be Office 2016
AppVersion = 2016

End Function

If you’d prefer to just download a workbook with the code in it, here you go.

Care to help me test it?

I’d love it if people could give this a try and see if it returns correctly based on the versions of Excel you’re running, particularly if you have a flavor of Office 365 or Excel 2019.

Let me know how it goes!

EDIT:  I have made a small change to the code and sample file in case «O365» is not at the beginning of the registry key.  This should pick it up no matter where in the key the 365 term shows up.  I am starting to wonder if this key is only present for Insiders.  So if you do test, please let us know what channel you are on in addition to whether or not it works!

Share:

36 thoughts on “Check the application version in Modern Office

  1. Hello Ken

    Your function comes up with «2016» but it should be «365».

  2. I have installed Office 365 MSO (16.0.11330.20014) 16 bits. Function respons is 2016.

  3. Ben & XLarium,

    Are you Office Insiders, or running a different channel? I’m wondering if that registry key is only present for Insiders…

  4. Yes, Office Insider.

  5. Hey Ben,

    So… what version of Office 365 (as in Home & Office, Professional Plus, etc..)? Can you check again? I’ve just updated the code to test if 365 is anywhere in that reg key, rather than just at the beginning.

  6. (as in Home & Office, Professional Plus, etc..)

  7. @Ken, my subscription is running on the monthly channel — not on Office Insider.
    Version 1901 Build 11231.20130 click-and-run

    No change with the modified code.

  8. Ken,
    It’s Office 365 Home. Function respons is still 2016.

  9. It didn’t work for me either. I’m on Office 365 ProPlus (Monthly Channel) and it reports 2016.

    I checked in regedit and I don’t have the key you are looking for «SoftwareMicrosoftOffice16.0CommonLicensingLicensingNext»

    I did notice one called «HKEY_CURRENT_USERSoftwareMicrosoftOffice16.0CommonLicensingLastKnownC2RProductReleaseId», however, that has a value of «O365ProPlusRetail»…you might want to take a look at that one.

  10. I did also a check on 3 older Excel versions which are installed on virtual machines:

    Office Professional Plus 2013 — Function returns 2013
    Office Professional Plus 2010 — Function returns 2010
    Office Enterprise 2007 — Function returns 2007

  11. I’m running Office 365 Personal and not on the Insider stream. The file I just downloaded at 4:35est reports that I am running Excel 365.

  12. Rob, that’s awesome info. I’m checking with someone else who also doesn’t have the key I targeted to see if they have the one you mentioned.

  13. Hi Ken. Function works fine for me.
    I’m using Office 365 ProPlus, monthly channel, version 1901 Build 11231.20130 click-to-run
    «O365ProPlusRetail» in the registry.
    Function returns 365.

  14. The function works for me on MS Office 2019 MSO (16.0.12624.20424) 64-bit.

  15. Microsoft has got you.

    There are OEM versions of office that are App-V installed, so no registry keys that are visible at all when Excel is not running.

  16. Fair enough, although I can’t say that I try to test this when Excel isn’t running, as it’s usually done via an Excel VBA Add-in, or a .NET based add-in. In either case, Excel has to be open for these tools to manifest themselves.

  17. Hi Ken,
    I desperately need to recognise the Excel version of several users, and most importantly identify those with Office365 which was giving some trouble with parts of my VBA code and came accross your post.
    Shouldn’t there be a way to determine the exact Office version of post 2016 office (all giving 16.0 response to application.version function) by iqnuiring the application.build number without the need to look for registry entries ?!

  18. Shouldn’t there be? Absolutely yes. Is there? Sadly no. 🙁

  19. Hi Ken,

    Thank you for sharing this function. It worked for me on 365 (Microsoft Excel for Microsoft 365 MSO (16.0.13127.20402) 64-bit

    It has been a very useful in solving a problem when MS has added to the Object Model (Comment versus CommentThreaded for example)

    I would be very interested to learn more about which versions don’t support this method (App-V?) and how widely these are used.

  20. Hi all,
    any news for a solution of this version number problem? (It’s not been a problem for me yet, but it may become one.)

    I’ve put off the installation of Office 2019 for a long time. Today I’ve installed 2019 and to my surprise I’ve made the discovery that the version number is still reported as 16. A quick search took me to this website.

    I’ve been running Office 2010 and 2016 in parallel and I’ve been hoping that 2019 will coexist, too. Negative, 2019 saddled on top of 2016. If I click on Show additional licensing information it shows both 2019 and below that entry it shows 2016. I’ve made a quick check for a few new features of 2019 and the application splash screen at startup also states inmistakenly 2019. So yes, it’s Office 2019. (And I may have to create yet another windows installation with Office 2016 for testing. 🙁 )

    Ken’s macro returns 0, though it is not ‘too old to bother with’
    arrEntryNames(x) has one entry which reads «MigrationToV5Done»
    application.version is 16.0
    application.build is 13231

    While this entry could easily be added to case 16, who knows if this entry may not also be used for updates to 365? And what other entries might be used in other scenarios/on other machines? Looks like potential proliferation of entries asking for updates everytime another entry has been discovered.

    Do we have to worry about our addins?
    Microsoft says:
    «Add-ins and other extensibility solutions that are compatible with Office 2016 will most likely be compatible with Office 2019 or will require only minimal testing.»
    https://docs.microsoft.com/en-us/deployoffice/office2019/overview

    See also https://www.asap-utilities.com/blog/index.php/2018/10/05/application-version-is-the-new-excel-2019-the-same-as-excel-2016/

    Somehow I do not feel easy about this as of now.

  21. Hi Volker,

    There is no hope in sight to resolve this issue. We’re all trying a variety of things to figure out how to determine the versions due to this lack of ability, and I’m sorry that mine isn’t working for you.

    I can confirm that you CANNOT have a 2016 and 2019 install side by side. They both use the Click-to-run installer, so one overwrites the other. The only way to get different versions for testing is to set up virtual machines AND disable updates on them after installing. (Failing to do this may leave you in a situation where your software reports as 2016 but actually provides Office 365. A key indicator is if your «2016» shows an update channel in the About screen.)

    I will say that I have no issues bringing code from 2016 -> 2019 -> O365. It’s when I have a feature that relies on O365 and I need to check if I have an earlier version that this whole thing comes in to play.

  22. Hi Kien,

    I honestly don’t know which versions don’t support the method. Wish I did!

  23. I need to determine whether or not 365 is being used or not on Macintosh installations. Obviously there is no Registry to check against.

    Do you know of a method of determining the presence of 365 on a Mac?

  24. Hi Howard,

    Sorry, but I don’t do any work with Mac computers, so really can’t help on this.

  25. I’m in the same situation of Rob on February 11, 2019 at 12:11 pm…
    Unfortunately your code can’t be used as is, but it requires to be modified calling the method «GetStringValue» to the members of the «arrEntryNames» array, recursively. This is because of the fact the string to be searched is in the value of the subkey and not in the name on the subkey (how can I image it is supposed to be in your case).
    Would you be so kind to share a regedit screenshot of the «LicensingNext» key in order to see where the string to search exactly is?

  26. Hi Jumpy,

    I just checked this on my Office version, and can see that this routine will no longer work. It seems that things have moved under the LastKnownC2RProductReleaseId key, which lists all individual apps with their O365 names… I just haven’t had the time to work out how to extract those registry values as they are different then the ones listed above.

  27. Hi Ken,
    tks for the quick response…
    If I understand well what you have told me, the «LicensingNext» key need no more to be scan because all info for O365 is moved to «LastKnownC2RProductReleaseId» key too. Is it right?
    So, even for O365, under the «LastKnownC2RProductReleaseId» key, you have a subkey for each Office App installed/licensed, named as «Excel», «Access», «Word», etc…, and valued with a string including the «O365» substring. Is it right?

  28. That’s correct. The full path to the Excel key is now:
    HKEY_CURRENT_USERSOFTWAREMicrosoftOffice16.0CommonLicensingLastKnownC2RProductReleaseIdExcel. It is a REG_SZ (string) with — in my case — a value of O365ProPlusRetail
    I have the same value for Access, Outlook, Word and others within that LastKnownC2RProductReleaseId branch.

  29. Perfect…
    it is the same as in my case, even if I have an O2019 installed on my machine and for each Office App subkey a value set to «ProPlus2019Retail»

  30. In previous versions of Office you could check even if the product was x32 or x64 on Win x64 because of the use of Wow6432Node folder in registry. Have you need to find this info for recent Office releases?
    Unfortunately the Wow6432Node folder seems not to be used anymore

    Anyway… many tks for your always quick responses

  31. I hope it will be useful for you and other…
    I have found another registry key from which extract the info we are looking for, including if the Office Suite is installed on x64/x32 bit platform
    The key is: HKEY_LOCAL_MACHINESOFTWAREMicrosoftOfficeClickToRunConfiguration
    The subkeys are:
    name:ProductReleaseIds, type:REG_SZ, value:ProPlus2019Retail
    name:Platform, type:REG_SZ, value:x86

    In such a way you can have all the info you need !!!

    Would you be so kind to check if this method is ok for you with O365 too?
    If yes, which are your data in the registry editor?

  32. I can confirm that I do have this key on my O365, yes. One thing to be careful with here though, is that ProductReleaseIDs is actually a comma delimited string if there is more than one product registered. (I have a Visio license installed as well.) I’m going to play with this a bit and see if it goes back as far as Office 2016 too. That could be very interesting…

  33. I have an Office Professional Plus 2016 installed on another machine. I can tell you that the HKEY_LOCAL_MACHINESOFTWAREMicrosoftOfficeClickToRunConfigurationProductReleaseIds subkey Value doesn’t not exist in that case.
    How does the key value appear with Visio App installed?

    If you find something interesting please share it

  34. Thanks Ken. I see there haven’t been any comments for a while, so I don’t know if you are still interested in feedback. Anyway, if you are …

    Microsoft Excel for Microsoft 365 MSO (Version 2304 Build 16.0.16316.2000) 64 Bit

    Microsoft 365 Insider Beta Channel

    MsgBox shows 365

    Thanks again, Trevor

  35. Would it be valid to add the following to check for 2021?

    If InStr(arrEntryNames(x), «2021») > 0 Then
    AppVersion = 2021
    Exit Function
    End If

  36. Hi Trevor, I have modified the code to include this.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Latest Posts

Excel Fundamentals Boot Camp

COACHED TRAINING: Excel Fundamentals Boot Camp Course Description In the Fundamentals Boot Camp, you will begin with a review core skills for the Excel analyst. This section is geared to

Read More »

Распознавание числовых значений в начале текстовых строк с помощью функции Val в коде VBA Excel. Определение текущей версии приложения Excel.

Val — это функция, которая распознает цифры с начала строки и до первого нецифрового символа, и возвращает их как числовое значение соответствующего типа.

Синтаксис

string — строка; переменная или выражение, возвращающие строку.

Примечание

Функция Val прекращает чтение строки на первом символе, который она не может распознать как цифру. Если среди цифр встречаются точки (.), то первая интерпретируется как десятичный разделитель, а вторая — уже как текст, на ней распознавание числа прекращается.

Примеры

Примеры с функцией Val

Sub Primer()

    MsgBox Val(«15 2 .3   38 попугаев»)  ‘Результат: 152,338

    MsgBox Val(«15.03.2022»)  ‘Результат: 15,03

    MsgBox Val(«.03.2022»)  ‘Результат: 0,03

    MsgBox Val(«Моя дата: 15.03.2022»)  ‘Результат: 0

    MsgBox Val(«+7 900 000 11 22»)  ‘Результат: 79000001122

    MsgBox Val(«+7(900)000-11-22»)  ‘Результат: 7

    MsgBox Val(«-7-900-000-11-22»)  ‘Результат: -7

End Sub

Определение версии Excel

Определение текущей версии приложения Excel из кода VBA с помощью функций Application.Version и Val:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

Sub ВерсияПриложения()

Dim a As String

Select Case Val(Application.Version)

    Case Is = 9

        a = » (Excel 2000)»

    Case Is = 10

        a = » (Excel 2002)»

    Case Is = 11

        a = » (Excel 2003)»

    Case Is = 12

        a = » (Excel 2007)»

    Case Is = 14

        a = » (Excel 2010)»

    Case Is = 15

        a = » (Excel 2013)»

    Case Is = 16

        a = » (Excel 2016)»

    Case Is = 17

        a = » (Excel 2019)»

    Case Is < 9

        a = » (старее Excel 2000)»

    Case Is > 17

        a = » (новее Excel 2019)»

    Case Else

        a = «»

End Select

MsgBox «Версия приложения « & Application.Version & a

End Sub

Здесь функция Val необходима из-за того, что функция Application.Version возвращает номер версии приложения в текстовом формате:


I’m unsure of the ProgId’s (friendly names on CLSID Guids) used for Excel, but a quick look leads me to ‘Excel.Application’, as the type you might activate.

Take a look under HKEY_CLASSES_ROOT, on my machine I see «Excel.Application» and «Excel.Application.12», i suspect that you are activating «Excel.Application», if you look under the «CurVer» key under «Excel.Application» it points back to «Excel.Application.12», inspect this value on your repro machines.

My guess would be that you are starting Excel.Application, you may want to force it to start Excel.Application.9 if the prog id exists on your target machine.

Here is a little code sample:

Type excel9Type = Type.GetTypeFromProgID("Excel.Application.9");
Type excelType = Type.GetTypeFromProgID("Excel.Application");

if (excelType == excel9Type)
{
    Console.WriteLine("Default Excel.Application is pointing to 'Verion 9' yay");
}
else
{
    Console.WriteLine("Excel is installed, but it's not 'Version 9'");
}

if (excel9Type == null)
{
    throw new InvalidOperationException("Excel.Application.9 is not a registered progid");
}

object excelApplication = Activator.CreateInstance(excel9Type);

// Cast excelApplication to whatever you are using as your application type. 

Понравилась статья? Поделить с друзьями:
  • New english word for today
  • New english word for the day
  • New english vocabulary word list
  • New english file word list
  • New english file intermediate word