Read Password Protected Excel Cell Using VBScript

Hi experts,

I have created a script that runs during an install of an Excel add-in, and would now like to perform some version checking of the add-in.  I have the current installed version stored in the registry, so accessing that is easy. The method that I am using to extract the version of the add-in that is being installed is by reading a couple of cells in a sheet inside the .xla file.

The question I have is how can I read the cells on a sheet inside a password protected .xla file using VBScript?
jonathan_hillsAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Chris BottomleyConnect With a Mentor Commented:
As a for instance:

Chris
    Set xlApp = CreateObject("excel.application")
    Set xlWB = xlApp.workbooks.Open("C:\Users\Chris\AppData\Roaming\Microsoft\AddIns\my_addin.xla")
    MsgBox "Ah-Ha! " & xlWB.worksheets(1).Range("a1")
    xlWB.Close False
    xlApp.Quit

Open in new window

0
 
Rory ArchibaldCommented:
You should just be able to read them the same way you read any cells.
0
 
jonathan_hillsAuthor Commented:
Thanks for the help !
0
All Courses

From novice to tech pro — start learning today.