Solved

Read Password Protected Excel Cell Using VBScript

Posted on 2010-09-16
3
637 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Problem to With line 4 39
Excel printing page management 2 20
Excel Hyperlink Question 4 26
Excel 2010 - Comparison of texts in a cell 14 34
Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

911 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

Need Help in Real-Time?

Connect with top rated Experts

27 Experts available now in Live!

Get 1:1 Help Now