Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Remove password
I have set passwords for Excel files through
SaveAsToolsGeneral OptionsPassword to Open... The users are allowed to use these password protected Excel files (for data entry) through a MSAccess Database which I created to manage the files. When the users select the files they want to use, the password is passed through the code and opens the file for them. Now the problem is the users want a copy of the Excel files for their reporting needs. So far I have managed to save a copy of the original Excel file on the user's desktop for them. How do I remove the password when I give a copy to the users? I tried ThisWorkbook.Unprotect ("password") and ActiveWorkbook.Unprotect("password") But they don't seem to remove the password required to open the file which was set in the Save As dialogue box. Can anyone point me in the direction how to achieve this? Thanks in advance Toyfixer |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Remove password
do a saveas without supplying a password. Choose to overwrite the existing
file. -- regards, Tom Ogilvy "ToyFixer" wrote: I have set passwords for Excel files through SaveAsToolsGeneral OptionsPassword to Open... The users are allowed to use these password protected Excel files (for data entry) through a MSAccess Database which I created to manage the files. When the users select the files they want to use, the password is passed through the code and opens the file for them. Now the problem is the users want a copy of the Excel files for their reporting needs. So far I have managed to save a copy of the original Excel file on the user's desktop for them. How do I remove the password when I give a copy to the users? I tried ThisWorkbook.Unprotect ("password") and ActiveWorkbook.Unprotect("password") But they don't seem to remove the password required to open the file which was set in the Save As dialogue box. Can anyone point me in the direction how to achieve this? Thanks in advance Toyfixer |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Remove password
Thank you for the reply Tom.
I managed to work it out myself. I used ThisWorkbook.SaveAs Filename:=WshShell.SpecialFolders("Desktop") & "\" & ThisWorkbook.Name, password:="" It removed the password of original file had, from the copy on the desktop "Tom Ogilvy" wrote: do a saveas without supplying a password. Choose to overwrite the existing file. -- regards, Tom Ogilvy "ToyFixer" wrote: I have set passwords for Excel files through SaveAsToolsGeneral OptionsPassword to Open... The users are allowed to use these password protected Excel files (for data entry) through a MSAccess Database which I created to manage the files. When the users select the files they want to use, the password is passed through the code and opens the file for them. Now the problem is the users want a copy of the Excel files for their reporting needs. So far I have managed to save a copy of the original Excel file on the user's desktop for them. How do I remove the password when I give a copy to the users? I tried ThisWorkbook.Unprotect ("password") and ActiveWorkbook.Unprotect("password") But they don't seem to remove the password required to open the file which was set in the Save As dialogue box. Can anyone point me in the direction how to achieve this? Thanks in advance Toyfixer |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Remove password
Just like I said - use saveas
ThisWorkbook.SaveAs Filename:=WshShell.SpecialFolders("Desktop") & "\" & ThisWorkbook.Name would have worked as well. -- Regards, Tom Ogilvy "ToyFixer" wrote: Thank you for the reply Tom. I managed to work it out myself. I used ThisWorkbook.SaveAs Filename:=WshShell.SpecialFolders("Desktop") & "\" & ThisWorkbook.Name, password:="" It removed the password of original file had, from the copy on the desktop "Tom Ogilvy" wrote: do a saveas without supplying a password. Choose to overwrite the existing file. -- regards, Tom Ogilvy "ToyFixer" wrote: I have set passwords for Excel files through SaveAsToolsGeneral OptionsPassword to Open... The users are allowed to use these password protected Excel files (for data entry) through a MSAccess Database which I created to manage the files. When the users select the files they want to use, the password is passed through the code and opens the file for them. Now the problem is the users want a copy of the Excel files for their reporting needs. So far I have managed to save a copy of the original Excel file on the user's desktop for them. How do I remove the password when I give a copy to the users? I tried ThisWorkbook.Unprotect ("password") and ActiveWorkbook.Unprotect("password") But they don't seem to remove the password required to open the file which was set in the Save As dialogue box. Can anyone point me in the direction how to achieve this? Thanks in advance Toyfixer |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Remove password
Hi Tom,
Thank you again for the valuable input. But it didn't get rid of the password without the 'password:=""' option. Maybe I have got something else which prevents it getting rid of the password without it. However, it works fine now. Thank you again. Toyfixer. "Tom Ogilvy" wrote: Just like I said - use saveas ThisWorkbook.SaveAs Filename:=WshShell.SpecialFolders("Desktop") & "\" & ThisWorkbook.Name would have worked as well. -- Regards, Tom Ogilvy "ToyFixer" wrote: Thank you for the reply Tom. I managed to work it out myself. I used ThisWorkbook.SaveAs Filename:=WshShell.SpecialFolders("Desktop") & "\" & ThisWorkbook.Name, password:="" It removed the password of original file had, from the copy on the desktop "Tom Ogilvy" wrote: do a saveas without supplying a password. Choose to overwrite the existing file. -- regards, Tom Ogilvy "ToyFixer" wrote: I have set passwords for Excel files through SaveAsToolsGeneral OptionsPassword to Open... The users are allowed to use these password protected Excel files (for data entry) through a MSAccess Database which I created to manage the files. When the users select the files they want to use, the password is passed through the code and opens the file for them. Now the problem is the users want a copy of the Excel files for their reporting needs. So far I have managed to save a copy of the original Excel file on the user's desktop for them. How do I remove the password when I give a copy to the users? I tried ThisWorkbook.Unprotect ("password") and ActiveWorkbook.Unprotect("password") But they don't seem to remove the password required to open the file which was set in the Save As dialogue box. Can anyone point me in the direction how to achieve this? Thanks in advance Toyfixer |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
remove password on VBA code | Excel Discussion (Misc queries) | |||
Remove Password | Excel Worksheet Functions | |||
PASSWORD REMOVAL I have the password to open the file and the password to modify the file now how to remove them | Excel Programming | |||
Remove a password | Excel Worksheet Functions | |||
Remove password | Excel Programming |