ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   GetObject (https://www.excelbanter.com/excel-programming/301550-getobject.html)

michael

GetObject
 
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)

Tom Ogilvy

GetObject
 
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.

--
Regards,
Tom Ogilvy

"Michael" wrote in message
...
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)




No Name

GetObject
 
I'm using VB script (not VBA) to manipulate the excel
file, that is why I need the GetObject procedure
-----Original Message-----
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.

--
Regards,
Tom Ogilvy

"Michael" wrote in

message
...
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)



.


Tom Ogilvy

GetObject
 
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")

--
Regards,
Tom Ogilvy

wrote in message
...
I'm using VB script (not VBA) to manipulate the excel
file, that is why I need the GetObject procedure
-----Original Message-----
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.

--
Regards,
Tom Ogilvy

"Michael" wrote in

message
...
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)



.





All times are GMT +1. The time now is 02:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com