GetObject

  • Thread starter Thread starter Michael
  • Start date Start date
M

Michael

How can I use GetObject to open an Excel file that has
password protection without getting the Excel dialog popup
(I have the password and can supply it but GetObject
doesn't appear to accept any paramaters other than the
file name)
 
if you are using Excel VBA, use

Workbooks.open Filename:="C:\Myfile.xls", Password:="ABCD"

You don't need to use GetObject and that would be the long way to do it.
 
I'm using VB script (not VBA) to manipulate the excel
file, that is why I need the GetObject procedure
 
use GetObject to start an instance of Excel. Assume you return the
reference to xlapp

set xlWkBk = xlApp.Workbooks.open( Filename:="C:\Myfile.xls",
Password:="ABCD")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top