Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default getObject and password protected workbook

Hi everybody,
I use an Excel file as my database and because of the security reasons I
want to make it protected , I have a second file that is shared among users
and this second file reads some data from the first file
I use
Set appExcelData = GetObject(filePath)
to reference the first file , but when I password protect it , it asks the
users for the password , how can I reference the first file and read its data
with giving the password somehwere in my code?
I know if I use open there is a parameter for password but I don't want to
open the file.
--
Best regards,
Edward
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default getObject and password protected workbook

You have to have the password in your code. But then you protect the VBA
module so people cannot read the pasword in the macro.

"Edward" wrote:

Hi everybody,
I use an Excel file as my database and because of the security reasons I
want to make it protected , I have a second file that is shared among users
and this second file reads some data from the first file
I use
Set appExcelData = GetObject(filePath)
to reference the first file , but when I password protect it , it asks the
users for the password , how can I reference the first file and read its data
with giving the password somehwere in my code?
I know if I use open there is a parameter for password but I don't want to
open the file.
--
Best regards,
Edward

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default getObject and password protected workbook

Thanks. I know that I need to ahev the password in my code but my question
was how? I use getobject not open that has password as one of it's parameters
--
Best regards,
Edward


"Joel" wrote:

You have to have the password in your code. But then you protect the VBA
module so people cannot read the pasword in the macro.

"Edward" wrote:

Hi everybody,
I use an Excel file as my database and because of the security reasons I
want to make it protected , I have a second file that is shared among users
and this second file reads some data from the first file
I use
Set appExcelData = GetObject(filePath)
to reference the first file , but when I password protect it , it asks the
users for the password , how can I reference the first file and read its data
with giving the password somehwere in my code?
I know if I use open there is a parameter for password but I don't want to
open the file.
--
Best regards,
Edward

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default getObject and password protected workbook

The object that is returned from GetObject is the same object that is
returned from an open workbooks. I don't know how you are protect the
workbook. Are you using an excel protection method or a window protectipi
method. What advantages Do you think you are achieving by using the
GetObject instead of Open workbooks.

If you have a shared file and want to Open the books as shared you could use
the ADO method. Right now I confused by the approach you are taking.

I don't recommend use Excel for shared apllications. Excel is not designed
to prevent sharing problems. I prefer to use Access for shared files and let
the user have access to the database by using a Query Table in an Excel
workbook.

"Edward" wrote:

Thanks. I know that I need to ahev the password in my code but my question
was how? I use getobject not open that has password as one of it's parameters
--
Best regards,
Edward


"Joel" wrote:

You have to have the password in your code. But then you protect the VBA
module so people cannot read the pasword in the macro.

"Edward" wrote:

Hi everybody,
I use an Excel file as my database and because of the security reasons I
want to make it protected , I have a second file that is shared among users
and this second file reads some data from the first file
I use
Set appExcelData = GetObject(filePath)
to reference the first file , but when I password protect it , it asks the
users for the password , how can I reference the first file and read its data
with giving the password somehwere in my code?
I know if I use open there is a parameter for password but I don't want to
open the file.
--
Best regards,
Edward

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default getObject and password protected workbook


Why are you using GetObject in the first place?

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)

On Mon, 5 Oct 2009 13:24:02 -0700, Edward
wrote:

Hi everybody,
I use an Excel file as my database and because of the security reasons I
want to make it protected , I have a second file that is shared among users
and this second file reads some data from the first file
I use
Set appExcelData = GetObject(filePath)
to reference the first file , but when I password protect it , it asks the
users for the password , how can I reference the first file and read its data
with giving the password somehwere in my code?
I know if I use open there is a parameter for password but I don't want to
open the file.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
password protected workbook Ann Excel Worksheet Functions 4 July 10th 08 10:47 PM
How To Get Into a Password Protected Workbook Donald Excel Programming 2 August 29th 06 07:18 PM
GetObject with Password [email protected] Excel Programming 7 March 30th 06 11:51 AM
Multiple workbook user's with Master workbook - all password protected Yvon Excel Discussion (Misc queries) 2 March 30th 05 01:34 PM
Open a password protected excel workbook from second workbook to fetch data using dynamic connection kaustav choudhury Excel Programming 2 April 3rd 04 06:18 AM


All times are GMT +1. The time now is 07:54 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"