Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Read Password Protected Excel Cell Using VBScript

Posted on 2010-09-16
3
Medium Priority
?
650 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 2000 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

730 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