Solved

Read Password Protected Excel Cell Using VBScript

Posted on 2010-09-16
3
644 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

728 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