Solved

Read Password Protected Excel Cell Using VBScript

Posted on 2010-09-16
3
636 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
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks for the help !
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
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 demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

763 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

7 Experts available now in Live!

Get 1:1 Help Now