Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Passwords on files used in calculation

Here's the situation - user has 15+ files that have unique passwords. They
also have one main file that they use to sum up the individual files.

When they open the main file it asks for the password for every file used in
the calc's. They want to avoid that.

My thought was to set up code to open all the individual files, using the
passwords, when the main file is opened. But my initial testing is showing
that the main file wants to update the linked info (the calc's) before it
runs the code in the Workbook_Open event.

Is there a better way to do this?

If not, can someone help me with the code. I have this in the Workbook_Open
sub of the main file and it gives me an Object Required error:

Private Sub Workbook_Open()
Dim wbk As Workbook

Set wbk =
Workbook.Open(Filename:="M:\XLDATA\Herb\Testing\Te st1\test1.xls",
password:="test1")

End Sub

Thanks!!

Lauri
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Passwords on files used in calculation


Workbook.Open...
- should be-
Workbooks.Open...
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)




"LauriS"
wrote in message
Here's the situation - user has 15+ files that have unique passwords. They
also have one main file that they use to sum up the individual files.

When they open the main file it asks for the password for every file used in
the calc's. They want to avoid that.

My thought was to set up code to open all the individual files, using the
passwords, when the main file is opened. But my initial testing is showing
that the main file wants to update the linked info (the calc's) before it
runs the code in the Workbook_Open event.

Is there a better way to do this?

If not, can someone help me with the code. I have this in the Workbook_Open
sub of the main file and it gives me an Object Required error:

Private Sub Workbook_Open()
Dim wbk As Workbook

Set wbk =
Workbook.Open(Filename:="M:\XLDATA\Herb\Testing\Te st1\test1.xls",
password:="test1")

End Sub

Thanks!!

Lauri
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Passwords on files used in calculation

Jim,

Thanks - that fixed the error msg I was getting.

But it doesn't work as I had hoped. The formulas try to update BEFORE the
Workbook_Open event happens.

At this point I'm thinking that I have to open all the individual files THEN
open the main file.

Does anyone know of another way??

Lauri
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Passwords on files used in calculation

Lauri,
Some ideas if you want to experiment...
Use this code line first: "ThisWorkbook.UpdateRemoteReferences = False"
Or this line: Application.Calculation = False
-or maybe-
Use a dummy workbook that has calculation turned off to open your workbook.
-or maybe-
Put your code in an Auto_Open sub (in a standard module, not in the
ThisWorkbook module) and see if you get different results.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)


"LauriS"
wrote in message
Jim,
Thanks - that fixed the error msg I was getting.
But it doesn't work as I had hoped. The formulas try to update BEFORE the
Workbook_Open event happens.
At this point I'm thinking that I have to open all the individual files THEN
open the main file.
Does anyone know of another way??
Lauri
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Passwords on files used in calculation

One more,

Use a dummy workbook to...
open the fifteen files
open the master workbook.
close itself.

Jim Cone



"Jim Cone"
wrote in message
Lauri,
Some ideas if you want to experiment...
Use this code line first: "ThisWorkbook.UpdateRemoteReferences = False"
Or this line: Application.Calculation = False
-or maybe-
Use a dummy workbook that has calculation turned off to open your workbook.
-or maybe-
Put your code in an Auto_Open sub (in a standard module, not in the
ThisWorkbook module) and see if you get different results.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)




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
I need to remove passwords from a list of files. Conan Kelly Excel Programming 4 November 17th 05 05:47 PM
suppressing passwords to edit linked files tjtjjtjt Excel Programming 2 September 14th 05 01:44 AM
updateLink; files with passwords , VBA help! tp Excel Programming 2 July 13th 05 09:14 AM
How to save Excel files which have passwords Android Excel Programming 1 October 4th 03 08:59 AM
How to save Excel files which have passwords Android Excel Programming 0 September 26th 03 02:39 PM


All times are GMT +1. The time now is 06:17 AM.

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

About Us

"It's about Microsoft Excel"