Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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
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
remove password on VBA code Tom Excel Discussion (Misc queries) 1 February 13th 10 06:36 AM
Remove Password Zita Excel Worksheet Functions 3 July 21st 09 07:33 PM
PASSWORD REMOVAL I have the password to open the file and the password to modify the file now how to remove them LJ[_4_] Excel Programming 0 April 27th 06 03:18 AM
Remove a password Kimberly Excel Worksheet Functions 1 October 5th 05 04:59 PM
Remove password Saul Margolis Excel Programming 1 August 25th 03 07:00 PM


All times are GMT +1. The time now is 07:13 PM.

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

About Us

"It's about Microsoft Excel"