Welcome to the { mindfrost82.com } forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Go Back   { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Microsoft > MS Office > Excel

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-01-2008, 07:05 PM
Michelle
 
Posts: n/a
Links to password protected workbooks

Hello, I have a summary sheet which links to many (20ish) password protected
files. Every time I open it or update the links, I have to enter many
(20ish) passwords.

Is there a way I can avoid or automate this process.

I am happy to use VBA (or any other method), but bear in mind that the files
are big and take 10 seconds or so to open.

I'd really appreciate any feedback.

Many thanks

M

Reply With Quote
  #2 (permalink)  
Old 05-01-2008, 07:11 PM
Ron de Bruin
 
Posts: n/a
Re: Links to password protected workbooks

Hi Michelle

Maybe you can use this add-in to get the values when you need them
There is a option to fill in the password

http://www.rondebruin.nl/merge.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Michelle" <mh_londonNOJUNK@hotmail.com> wrote in message news:B56C217E-B55D-40B7-87BF-DD276D513437@microsoft.com...
> Hello, I have a summary sheet which links to many (20ish) password protected
> files. Every time I open it or update the links, I have to enter many
> (20ish) passwords.
>
> Is there a way I can avoid or automate this process.
>
> I am happy to use VBA (or any other method), but bear in mind that the files
> are big and take 10 seconds or so to open.
>
> I'd really appreciate any feedback.
>
> Many thanks
>
> M
>

Reply With Quote
  #3 (permalink)  
Old 05-01-2008, 07:55 PM
Michelle
 
Posts: n/a
Re: Links to password protected workbooks

Thanks Ron - Will the add in allow me to store 20 passwords for all the
different files?

M

"Ron de Bruin" <rondebruin@kabelfoon.nl> wrote in message
news:O31jLb7qIHA.5940@TK2MSFTNGP04.phx.gbl...
> Hi Michelle
>
> Maybe you can use this add-in to get the values when you need them
> There is a option to fill in the password
>
> http://www.rondebruin.nl/merge.htm
>
>
> --
>
> Regards Ron de Bruin
> http://www.rondebruin.nl/tips.htm
>
>
> "Michelle" <mh_londonNOJUNK@hotmail.com> wrote in message
> news:B56C217E-B55D-40B7-87BF-DD276D513437@microsoft.com...
>> Hello, I have a summary sheet which links to many (20ish) password
>> protected files. Every time I open it or update the links, I have to
>> enter many (20ish) passwords.
>>
>> Is there a way I can avoid or automate this process.
>>
>> I am happy to use VBA (or any other method), but bear in mind that the
>> files are big and take 10 seconds or so to open.
>>
>> I'd really appreciate any feedback.
>>
>> Many thanks
>>
>> M


Reply With Quote
  #4 (permalink)  
Old 05-01-2008, 08:01 PM
Dave Peterson
 
Posts: n/a
Re: Links to password protected workbooks

Maybe you could have another workbook contains a macro that opens the other 20
workbooks. The macro would need to know all the names and passwords for the
files.

(Saved from a previous post.)

Option Explicit
Sub testme()

Dim myFileNames As Variant
Dim myPasswords As Variant
Dim iCtr As Long
Dim myRealWkbk As Workbook
Dim myRealWkbkName As String
Dim wkbk As Workbook

myRealWkbkName = "C:\my documents\excel\book1.xls"

myFileNames = Array("C:\my documents\excel\book11.xls", _
"C:\my documents\excel\book21.xls", _
"C:\my other folder\book11.xls")

myPasswords = Array("pwd1", _
"pwd2", _
"pwd3")

If UBound(myFileNames) <> UBound(myPasswords) Then
MsgBox "check names & passwords--qty mismatch!"
Exit Sub
End If

Set myRealWkbk = Workbooks.Open(Filename:=myRealWkbkName, UpdateLinks:=0)

For iCtr = LBound(myFileNames) To UBound(myFileNames)
Set wkbk = Nothing
On Error Resume Next
Set wkbk = Workbooks.Open(Filename:=myFileNames(iCtr), _
Password:=myPasswords(iCtr))
On Error GoTo 0

If wkbk Is Nothing Then
MsgBox "Check file: " & myFileNames(iCtr)
Exit Sub
End If

wkbk.Close savechanges:=False
Next iCtr

End Sub

Michelle wrote:
>
> Hello, I have a summary sheet which links to many (20ish) password protected
> files. Every time I open it or update the links, I have to enter many
> (20ish) passwords.
>
> Is there a way I can avoid or automate this process.
>
> I am happy to use VBA (or any other method), but bear in mind that the files
> are big and take 10 seconds or so to open.
>
> I'd really appreciate any feedback.
>
> Many thanks
>
> M


--

Dave Peterson
Reply With Quote
  #5 (permalink)  
Old 05-01-2008, 08:05 PM
Ron de Bruin
 
Posts: n/a
Re: Links to password protected workbooks

No, if you have 20 passwords you need Dave's example

Make your life easier and use the same password or not use a password
Very easy to break the password

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Michelle" <mh_londonNOJUNK@hotmail.com> wrote in message news:256597FA-B3C6-4523-9B55-850C9A43A346@microsoft.com...
> Thanks Ron - Will the add in allow me to store 20 passwords for all the
> different files?
>
> M
>
> "Ron de Bruin" <rondebruin@kabelfoon.nl> wrote in message
> news:O31jLb7qIHA.5940@TK2MSFTNGP04.phx.gbl...
>> Hi Michelle
>>
>> Maybe you can use this add-in to get the values when you need them
>> There is a option to fill in the password
>>
>> http://www.rondebruin.nl/merge.htm
>>
>>
>> --
>>
>> Regards Ron de Bruin
>> http://www.rondebruin.nl/tips.htm
>>
>>
>> "Michelle" <mh_londonNOJUNK@hotmail.com> wrote in message
>> news:B56C217E-B55D-40B7-87BF-DD276D513437@microsoft.com...
>>> Hello, I have a summary sheet which links to many (20ish) password
>>> protected files. Every time I open it or update the links, I have to
>>> enter many (20ish) passwords.
>>>
>>> Is there a way I can avoid or automate this process.
>>>
>>> I am happy to use VBA (or any other method), but bear in mind that the
>>> files are big and take 10 seconds or so to open.
>>>
>>> I'd really appreciate any feedback.
>>>
>>> Many thanks
>>>
>>> M

>

Reply With Quote
  #6 (permalink)  
Old 05-01-2008, 09:22 PM
Michelle
 
Posts: n/a
Re: Links to password protected workbooks

I like it, when should I run it? Is it in the Open event? Should I click
update links when the file opens?

How does it interface with the requirement to have the links updated when
the file opens?

Thanks

M

"Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
news:481A13A7.9BBE45F1@verizonXSPAM.net...
> Maybe you could have another workbook contains a macro that opens the
> other 20
> workbooks. The macro would need to know all the names and passwords for
> the
> files.
>
> (Saved from a previous post.)
>
> Option Explicit
> Sub testme()
>
> Dim myFileNames As Variant
> Dim myPasswords As Variant
> Dim iCtr As Long
> Dim myRealWkbk As Workbook
> Dim myRealWkbkName As String
> Dim wkbk As Workbook
>
> myRealWkbkName = "C:\my documents\excel\book1.xls"
>
> myFileNames = Array("C:\my documents\excel\book11.xls", _
> "C:\my documents\excel\book21.xls", _
> "C:\my other folder\book11.xls")
>
> myPasswords = Array("pwd1", _
> "pwd2", _
> "pwd3")
>
> If UBound(myFileNames) <> UBound(myPasswords) Then
> MsgBox "check names & passwords--qty mismatch!"
> Exit Sub
> End If
>
> Set myRealWkbk = Workbooks.Open(Filename:=myRealWkbkName,
> UpdateLinks:=0)
>
> For iCtr = LBound(myFileNames) To UBound(myFileNames)
> Set wkbk = Nothing
> On Error Resume Next
> Set wkbk = Workbooks.Open(Filename:=myFileNames(iCtr), _
> Password:=myPasswords(iCtr))
> On Error GoTo 0
>
> If wkbk Is Nothing Then
> MsgBox "Check file: " & myFileNames(iCtr)
> Exit Sub
> End If
>
> wkbk.Close savechanges:=False
> Next iCtr
>
> End Sub
>
> Michelle wrote:
>>
>> Hello, I have a summary sheet which links to many (20ish) password
>> protected
>> files. Every time I open it or update the links, I have to enter many
>> (20ish) passwords.
>>
>> Is there a way I can avoid or automate this process.
>>
>> I am happy to use VBA (or any other method), but bear in mind that the
>> files
>> are big and take 10 seconds or so to open.
>>
>> I'd really appreciate any feedback.
>>
>> Many thanks
>>
>> M

>
> --
>
> Dave Peterson


Reply With Quote
  #7 (permalink)  
Old 05-02-2008, 12:21 AM
Dave Peterson
 
Posts: n/a
Re: Links to password protected workbooks

Use it to open all 21 workbooks. Don't open them yourself.

If you look at the code, it opens your "real" workbook first--but doesn't update
the links.

Then it opens each of the other 20 "sending" workbooks. After each of the
sending workbooks is opened, the links to that workbook will recalc. Then that
sending workbook is closed.

If these other 20 workbooks change while you have the real workbook open and you
want to refresh the links, you can run a macro that's almost exactly the same.

Just delete the line that opens the real workbook--you don't want that to happen
again.

This is the line to be removed:
Set myRealWkbk = Workbooks.Open(Filename:=myRealWkbkName, UpdateLinks:=0)



Michelle wrote:
>
> I like it, when should I run it? Is it in the Open event? Should I click
> update links when the file opens?
>
> How does it interface with the requirement to have the links updated when
> the file opens?
>
> Thanks
>
> M
>
> "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
> news:481A13A7.9BBE45F1@verizonXSPAM.net...
> > Maybe you could have another workbook contains a macro that opens the
> > other 20
> > workbooks. The macro would need to know all the names and passwords for
> > the
> > files.
> >
> > (Saved from a previous post.)
> >
> > Option Explicit
> > Sub testme()
> >
> > Dim myFileNames As Variant
> > Dim myPasswords As Variant
> > Dim iCtr As Long
> > Dim myRealWkbk As Workbook
> > Dim myRealWkbkName As String
> > Dim wkbk As Workbook
> >
> > myRealWkbkName = "C:\my documents\excel\book1.xls"
> >
> > myFileNames = Array("C:\my documents\excel\book11.xls", _
> > "C:\my documents\excel\book21.xls", _
> > "C:\my other folder\book11.xls")
> >
> > myPasswords = Array("pwd1", _
> > "pwd2", _
> > "pwd3")
> >
> > If UBound(myFileNames) <> UBound(myPasswords) Then
> > MsgBox "check names & passwords--qty mismatch!"
> > Exit Sub
> > End If
> >
> > Set myRealWkbk = Workbooks.Open(Filename:=myRealWkbkName,
> > UpdateLinks:=0)
> >
> > For iCtr = LBound(myFileNames) To UBound(myFileNames)
> > Set wkbk = Nothing
> > On Error Resume Next
> > Set wkbk = Workbooks.Open(Filename:=myFileNames(iCtr), _
> > Password:=myPasswords(iCtr))
> > On Error GoTo 0
> >
> > If wkbk Is Nothing Then
> > MsgBox "Check file: " & myFileNames(iCtr)
> > Exit Sub
> > End If
> >
> > wkbk.Close savechanges:=False
> > Next iCtr
> >
> > End Sub
> >
> > Michelle wrote:
> >>
> >> Hello, I have a summary sheet which links to many (20ish) password
> >> protected
> >> files. Every time I open it or update the links, I have to enter many
> >> (20ish) passwords.
> >>
> >> Is there a way I can avoid or automate this process.
> >>
> >> I am happy to use VBA (or any other method), but bear in mind that the
> >> files
> >> are big and take 10 seconds or so to open.
> >>
> >> I'd really appreciate any feedback.
> >>
> >> Many thanks
> >>
> >> M

> >
> > --
> >
> > Dave Peterson


--

Dave Peterson
Reply With Quote
  #8 (permalink)  
Old 05-02-2008, 08:35 AM
Michelle
 
Posts: n/a
Re: Links to password protected workbooks

Thanks - that's great

M

"Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
news:481A5086.15A868F6@verizonXSPAM.net...
> Use it to open all 21 workbooks. Don't open them yourself.
>
> If you look at the code, it opens your "real" workbook first--but doesn't
> update
> the links.
>
> Then it opens each of the other 20 "sending" workbooks. After each of the
> sending workbooks is opened, the links to that workbook will recalc. Then
> that
> sending workbook is closed.
>
> If these other 20 workbooks change while you have the real workbook open
> and you
> want to refresh the links, you can run a macro that's almost exactly the
> same.
>
> Just delete the line that opens the real workbook--you don't want that to
> happen
> again.
>
> This is the line to be removed:
> Set myRealWkbk = Workbooks.Open(Filename:=myRealWkbkName, UpdateLinks:=0)
>
>
>
> Michelle wrote:
>>
>> I like it, when should I run it? Is it in the Open event? Should I click
>> update links when the file opens?
>>
>> How does it interface with the requirement to have the links updated when
>> the file opens?
>>
>> Thanks
>>
>> M
>>
>> "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
>> news:481A13A7.9BBE45F1@verizonXSPAM.net...
>> > Maybe you could have another workbook contains a macro that opens the
>> > other 20
>> > workbooks. The macro would need to know all the names and passwords
>> > for
>> > the
>> > files.
>> >
>> > (Saved from a previous post.)
>> >
>> > Option Explicit
>> > Sub testme()
>> >
>> > Dim myFileNames As Variant
>> > Dim myPasswords As Variant
>> > Dim iCtr As Long
>> > Dim myRealWkbk As Workbook
>> > Dim myRealWkbkName As String
>> > Dim wkbk As Workbook
>> >
>> > myRealWkbkName = "C:\my documents\excel\book1.xls"
>> >
>> > myFileNames = Array("C:\my documents\excel\book11.xls", _
>> > "C:\my documents\excel\book21.xls", _
>> > "C:\my other folder\book11.xls")
>> >
>> > myPasswords = Array("pwd1", _
>> > "pwd2", _
>> > "pwd3")
>> >
>> > If UBound(myFileNames) <> UBound(myPasswords) Then
>> > MsgBox "check names & passwords--qty mismatch!"
>> > Exit Sub
>> > End If
>> >
>> > Set myRealWkbk = Workbooks.Open(Filename:=myRealWkbkName,
>> > UpdateLinks:=0)
>> >
>> > For iCtr = LBound(myFileNames) To UBound(myFileNames)
>> > Set wkbk = Nothing
>> > On Error Resume Next
>> > Set wkbk = Workbooks.Open(Filename:=myFileNames(iCtr), _
>> > Password:=myPasswords(iCtr))
>> > On Error GoTo 0
>> >
>> > If wkbk Is Nothing Then
>> > MsgBox "Check file: " & myFileNames(iCtr)
>> > Exit Sub
>> > End If
>> >
>> > wkbk.Close savechanges:=False
>> > Next iCtr
>> >
>> > End Sub
>> >
>> > Michelle wrote:
>> >>
>> >> Hello, I have a summary sheet which links to many (20ish) password
>> >> protected
>> >> files. Every time I open it or update the links, I have to enter many
>> >> (20ish) passwords.
>> >>
>> >> Is there a way I can avoid or automate this process.
>> >>
>> >> I am happy to use VBA (or any other method), but bear in mind that the
>> >> files
>> >> are big and take 10 seconds or so to open.
>> >>
>> >> I'd really appreciate any feedback.
>> >>
>> >> Many thanks
>> >>
>> >> M
>> >
>> > --
>> >
>> > Dave Peterson

>
> --
>
> Dave Peterson


Reply With Quote
  #9 (permalink)  
Old 05-02-2008, 05:43 PM
Spiky
 
Posts: n/a
Re: Links to password protected workbooks

Does anyone know why this happens? I will soon be writing similar
summary files, so it may be apropros for me. But when I test it, my
links update without requiring the passwords.
Reply With Quote
  #10 (permalink)  
Old 05-02-2008, 06:33 PM
Dave Peterson
 
Posts: n/a
Re: Links to password protected workbooks

What did you protect and how did you protect it?

Did you use worksheet protection or workbook protection?
If workbook, did you use tools|Protect|protect workbook?
Or did you use File|SaveAs|tools|General options|Password to modify or password
to open?

Spiky wrote:
>
> Does anyone know why this happens? I will soon be writing similar
> summary files, so it may be apropros for me. But when I test it, my
> links update without requiring the passwords.


--

Dave Peterson
Reply With Quote
Reply

  { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Microsoft > MS Office > Excel


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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



All times are GMT. The time now is 04:04 PM.


Powered by vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
© 1999-2008 mindfrost82.com v11.0


Sponsors:
Loans | Loans | Mortgage | Credit Counseling | Child Trust Funds



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114