Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default Global Password Change

We have a number of worksheets containing sensitive data that are protected
by password. Periodically, the firm's principal requests that we change the
password for each. As there are a relatively large number of sheets to
change, is there a means by which we could update the password for all sheets
in a folder & its subfolders?

Thank you.
Sprinks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 269
Default Global Password Change

Sprinks, are you saying you want to change the passwords of all the
worksheets in all the workbooks in a folder and its subfolder? How
complicated this will be depends on 1. Do all the worksheets in each
workbook have the same password? 2. Do all the worksheets in ALL the
workbooks have the same password? James
Sprinks wrote:
We have a number of worksheets containing sensitive data that are protected
by password. Periodically, the firm's principal requests that we change the
password for each. As there are a relatively large number of sheets to
change, is there a means by which we could update the password for all sheets
in a folder & its subfolders?

Thank you.
Sprinks


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default Global Password Change

Zone,

Thank you for your response. Im glad you asked the question, because our
requirements are somewhat more complex than I originally thought. The
current situation is:

€˘ Some workbooks have a password but their worksheets do not.
€˘ Some workbooks have a password and passwords on their sheets as well.
€˘ The passwords are currently not all the same due to poor management by
their previous owner. There is no need for them to be different, nor is
there a need to have a password for any worksheets. One on the workbook
itself is sufficient.
€˘ Some workbooks in the current folder do not have a password.
€˘ The VBA solution should:
o request the folder to operate upon
o request the current password from the user
o change the password of all workbooks in the folder and its
subfolders where the currently assigned password matches the one entered or
is blank
o remove the password from all worksheets

The user could initially run the code multiple times for the 2 or 3
passwords currently in use.

The user has asked for one additional requirement. Since she uses dozens,
even hundreds of workbooks a day, she is asking if in lieu of logging into
each workbook with the same identical password, she could log in once into a
€śmaster€ť workbook.

As long as this workbook is open, it would provide the password needed to
open the second workbook, providing in essence a €śpassword by session€ť. When
she leaves her desk, she will log out of the master workbook to prevent
others from loading any of the protected workbooks.

Thanks for your help.
Sprinks




"Zone" wrote:

Sprinks, are you saying you want to change the passwords of all the
worksheets in all the workbooks in a folder and its subfolder? How
complicated this will be depends on 1. Do all the worksheets in each
workbook have the same password? 2. Do all the worksheets in ALL the
workbooks have the same password? James
Sprinks wrote:
We have a number of worksheets containing sensitive data that are protected
by password. Periodically, the firm's principal requests that we change the
password for each. As there are a relatively large number of sheets to
change, is there a means by which we could update the password for all sheets
in a folder & its subfolders?

Thank you.
Sprinks



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Global Password Change

What you are after is certianly doable, but you need to break it down into
steps.

0. Ask the user for the new PW to use on all WBs.

1. Open/list files in a folder and subfolders:
See Bob's answer to "Recursive procedure" in this NG from 18/10.

2. Provide an InputBox to accept the user's input of the WB Password.

3. Using PW to attempt to open the first WBs from #1. Trap the error on
failure and optionally record the WB's name.

4. Check for protection on the WSs in the newly opened WB, asking the user
for PW input if necessary. Unprotect each.

5. Protect the WB with the PW from #0

6. Save/Close the WB

7. Loop to #3, until all WBs from #1 are processed.

As for the "session" password, maybe you need application level events, with
an InputBox routine in Personal.xls to request PW upon opening:
http://www.cpearson.com/excel/AppEvent.htm

NickHK

"Sprinks" wrote in message
...
Zone,

Thank you for your response. I'm glad you asked the question, because our
requirements are somewhat more complex than I originally thought. The
current situation is:

. Some workbooks have a password but their worksheets do not.
. Some workbooks have a password and passwords on their sheets as well.
. The passwords are currently not all the same due to poor management by
their previous owner. There is no need for them to be different, nor is
there a need to have a password for any worksheets. One on the workbook
itself is sufficient.
. Some workbooks in the current folder do not have a password.
. The VBA solution should:
o request the folder to operate upon
o request the current password from the user
o change the password of all workbooks in the folder and its
subfolders where the currently assigned password matches the one entered

or
is blank
o remove the password from all worksheets

The user could initially run the code multiple times for the 2 or 3
passwords currently in use.

The user has asked for one additional requirement. Since she uses dozens,
even hundreds of workbooks a day, she is asking if in lieu of logging into
each workbook with the same identical password, she could log in once into

a
"master" workbook.

As long as this workbook is open, it would provide the password needed to
open the second workbook, providing in essence a "password by session".

When
she leaves her desk, she will log out of the master workbook to prevent
others from loading any of the protected workbooks.

Thanks for your help.
Sprinks




"Zone" wrote:

Sprinks, are you saying you want to change the passwords of all the
worksheets in all the workbooks in a folder and its subfolder? How
complicated this will be depends on 1. Do all the worksheets in each
workbook have the same password? 2. Do all the worksheets in ALL the
workbooks have the same password? James
Sprinks wrote:
We have a number of worksheets containing sensitive data that are

protected
by password. Periodically, the firm's principal requests that we

change the
password for each. As there are a relatively large number of sheets

to
change, is there a means by which we could update the password for all

sheets
in a folder & its subfolders?

Thank you.
Sprinks





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 269
Default Global Password Change

Sprinks, I agree with Nick. If you break this project down into
individual steps, you can focus on each step in turn. And if you get
stuck on a step, you can post a question on that step. James
NickHK wrote:
What you are after is certianly doable, but you need to break it down into
steps.

0. Ask the user for the new PW to use on all WBs.

1. Open/list files in a folder and subfolders:
See Bob's answer to "Recursive procedure" in this NG from 18/10.

2. Provide an InputBox to accept the user's input of the WB Password.

3. Using PW to attempt to open the first WBs from #1. Trap the error on
failure and optionally record the WB's name.

4. Check for protection on the WSs in the newly opened WB, asking the user
for PW input if necessary. Unprotect each.

5. Protect the WB with the PW from #0

6. Save/Close the WB

7. Loop to #3, until all WBs from #1 are processed.

As for the "session" password, maybe you need application level events, with
an InputBox routine in Personal.xls to request PW upon opening:
http://www.cpearson.com/excel/AppEvent.htm

NickHK

"Sprinks" wrote in message
...
Zone,

Thank you for your response. I'm glad you asked the question, because our
requirements are somewhat more complex than I originally thought. The
current situation is:

. Some workbooks have a password but their worksheets do not.
. Some workbooks have a password and passwords on their sheets as well.
. The passwords are currently not all the same due to poor management by
their previous owner. There is no need for them to be different, nor is
there a need to have a password for any worksheets. One on the workbook
itself is sufficient.
. Some workbooks in the current folder do not have a password.
. The VBA solution should:
o request the folder to operate upon
o request the current password from the user
o change the password of all workbooks in the folder and its
subfolders where the currently assigned password matches the one entered

or
is blank
o remove the password from all worksheets

The user could initially run the code multiple times for the 2 or 3
passwords currently in use.

The user has asked for one additional requirement. Since she uses dozens,
even hundreds of workbooks a day, she is asking if in lieu of logging into
each workbook with the same identical password, she could log in once into

a
"master" workbook.

As long as this workbook is open, it would provide the password needed to
open the second workbook, providing in essence a "password by session".

When
she leaves her desk, she will log out of the master workbook to prevent
others from loading any of the protected workbooks.

Thanks for your help.
Sprinks




"Zone" wrote:

Sprinks, are you saying you want to change the passwords of all the
worksheets in all the workbooks in a folder and its subfolder? How
complicated this will be depends on 1. Do all the worksheets in each
workbook have the same password? 2. Do all the worksheets in ALL the
workbooks have the same password? James
Sprinks wrote:
We have a number of worksheets containing sensitive data that are

protected
by password. Periodically, the firm's principal requests that we

change the
password for each. As there are a relatively large number of sheets

to
change, is there a means by which we could update the password for all

sheets
in a folder & its subfolders?

Thank you.
Sprinks





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default Global Password Change

Nick and James,

Thank you for your help. I agree--Divide and Conquer.

Unfortunately, although I'm an experienced Access programmer, I don't have
much background in Excel. My attempt at the first step, getting the folder
name, displays the dialog box, but what is selected does not transfer to the
Folder Name: input box.

Am I missing something? I'm using Excel 2003 (11.8033.8036) SP2.

Thank you.
Sprinks

Sub ResetPasswords()
On Error Resume Next

Dim fd As FileDialog

' Request folder name
Set fd = Application.FileDialog(msoFileDialogFolderPicker)
fd.Show

End Sub


"Zone" wrote:

Sprinks, I agree with Nick. If you break this project down into
individual steps, you can focus on each step in turn. And if you get
stuck on a step, you can post a question on that step. James
NickHK wrote:
What you are after is certianly doable, but you need to break it down into
steps.

0. Ask the user for the new PW to use on all WBs.

1. Open/list files in a folder and subfolders:
See Bob's answer to "Recursive procedure" in this NG from 18/10.

2. Provide an InputBox to accept the user's input of the WB Password.

3. Using PW to attempt to open the first WBs from #1. Trap the error on
failure and optionally record the WB's name.

4. Check for protection on the WSs in the newly opened WB, asking the user
for PW input if necessary. Unprotect each.

5. Protect the WB with the PW from #0

6. Save/Close the WB

7. Loop to #3, until all WBs from #1 are processed.

As for the "session" password, maybe you need application level events, with
an InputBox routine in Personal.xls to request PW upon opening:
http://www.cpearson.com/excel/AppEvent.htm

NickHK

"Sprinks" wrote in message
...
Zone,

Thank you for your response. I'm glad you asked the question, because our
requirements are somewhat more complex than I originally thought. The
current situation is:

. Some workbooks have a password but their worksheets do not.
. Some workbooks have a password and passwords on their sheets as well.
. The passwords are currently not all the same due to poor management by
their previous owner. There is no need for them to be different, nor is
there a need to have a password for any worksheets. One on the workbook
itself is sufficient.
. Some workbooks in the current folder do not have a password.
. The VBA solution should:
o request the folder to operate upon
o request the current password from the user
o change the password of all workbooks in the folder and its
subfolders where the currently assigned password matches the one entered

or
is blank
o remove the password from all worksheets

The user could initially run the code multiple times for the 2 or 3
passwords currently in use.

The user has asked for one additional requirement. Since she uses dozens,
even hundreds of workbooks a day, she is asking if in lieu of logging into
each workbook with the same identical password, she could log in once into

a
"master" workbook.

As long as this workbook is open, it would provide the password needed to
open the second workbook, providing in essence a "password by session".

When
she leaves her desk, she will log out of the master workbook to prevent
others from loading any of the protected workbooks.

Thanks for your help.
Sprinks




"Zone" wrote:

Sprinks, are you saying you want to change the passwords of all the
worksheets in all the workbooks in a folder and its subfolder? How
complicated this will be depends on 1. Do all the worksheets in each
workbook have the same password? 2. Do all the worksheets in ALL the
workbooks have the same password? James
Sprinks wrote:
We have a number of worksheets containing sensitive data that are

protected
by password. Periodically, the firm's principal requests that we

change the
password for each. As there are a relatively large number of sheets

to
change, is there a means by which we could update the password for all

sheets
in a folder & its subfolders?

Thank you.
Sprinks




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
Global Change Of Formula Value carl Excel Worksheet Functions 2 October 21st 11 11:12 PM
Excel -Cannot global Header change Rag742 Excel Discussion (Misc queries) 4 February 14th 07 10:05 PM
Global change to cell values Karen McKenzie Excel Discussion (Misc queries) 2 July 5th 06 10:08 AM
How do I do a global change from uppercase to lowercase? Instrument Guy Excel Discussion (Misc queries) 2 February 17th 06 08:20 PM
Global file reference change Ronen Ben-Hai Excel Programming 3 November 3rd 03 06:49 PM


All times are GMT +1. The time now is 05:43 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"