View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
arunjoshi[_18_] arunjoshi[_18_] is offline
external usenet poster
 
Posts: 1
Default macro code to change file-opening password


i have created a testing tool which is meant for administering a test
containing multiple-choice questions.

the test-taker is given a copy of the file, and a password (say,
"open_sesame", without the quotes) which allows him to start the test.
after he has completed the test, he needs to click a button which runs
a macro that saves and closes the file.

I also want this macro to change the password (from "sesame" to the
contents of cell A1 in Sheet1) before it is saved and closed.

the idea is to make the file unusable a second time, becasue the
test-taker would not know password to start the test once it has been
re-set.

can you help me with the macro code for re-setting the password.
thanks.


--
arunjoshi
------------------------------------------------------------------------
arunjoshi's Profile: http://www.excelforum.com/member.php...fo&userid=8846
View this thread: http://www.excelforum.com/showthread...hreadid=379593