Programatically get installed Version of Google Chrome VBA

pingme89

Board Regular
Joined
Jan 23, 2014
Messages
170
Office Version
  1. 365
Platform
  1. Windows
I have noticed that you can get the installed version of Google Chrome from the registry at:
Computer\HKEY_CURRENT_USER\Software\Google\Chrome\BLBeacon
The key is labeled "version".

How can I write a VBA script to get the value in that registry key?
I am using 64bit OS. I am using Microsoft Office Professional Plus 2016.

Thanks in advance.
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Works for me under 32bit Office, 64bit Win10
VBA Code:
Sub ChromeVersion()
    MsgBox CreateObject("WScript.Shell").RegRead("HKEY_CURRENT_USER\Software\Google\Chrome\BLBeacon\version"), vbInformation, "Chrome Version"
End Sub
 
Upvote 0
Solution
But when I try to place the result into a varible, the VBA code is RED and the syntax isn't right.
Version = CreateObject("WScript.Shell").RegRead("HKEY_CURRENT_USER\Software\Google\Chrome\BLBeacon\version"), vbInformation, "Chrome Version"
 
Upvote 0
That's because you are trying to assign the entire Msgbox definition to a variable. Do this instead:
VBA Code:
 Version = CreateObject("WScript.Shell").RegRead("HKEY_CURRENT_USER\Software\Google\Chrome\BLBeacon\version")
BTW, when you post code you should use the code tag wrapper (select your code then press "<vba/>" in the menu above). It makes it much easier for everyone else to read it.
 
Upvote 0
Thank you. That worked. I didn't know about the "<vba>" format. I will use it in the future. Thank you for the advice and knowledge.
 
Upvote 0

Forum statistics

Threads
1,214,568
Messages
6,120,272
Members
448,953
Latest member
Dutchie_1

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top