Solved

Read Password Protected Excel Cell Using VBScript

Posted on 2010-09-16
3
638 Views
Last Modified: 2012-06-21
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?
0
Comment
Question by:jonathan_hills
3 Comments
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 33693551
You should just be able to read them the same way you read any cells.
0
 
LVL 59

Accepted Solution

by:
Chris Bottomley earned 500 total points
ID: 33693776
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
 

Author Closing Comment

by:jonathan_hills
ID: 33694130
Thanks for the help !
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Finding a closest match in Excel 7 44
And OR formula 5 22
where is the button of Relative Reference in Developer Tab Excel In MAC 5 25
If help 9 47
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question