Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
password protected workbook | Excel Worksheet Functions | |||
How To Get Into a Password Protected Workbook | Excel Programming | |||
GetObject with Password | Excel Programming | |||
Multiple workbook user's with Master workbook - all password protected | Excel Discussion (Misc queries) | |||
Open a password protected excel workbook from second workbook to fetch data using dynamic connection | Excel Programming |