Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Macro to Unprotect Sheet

Do any of you happen to know of any code that will
unprotect an Excel sheet when run?

The password will be input by the user in a designated
cell.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Macro to Unprotect Sheet

Hi
maybe something like

sub foo()
on error resume next
with activesheet
.unprotect password:= .range("A1").value
end with
on error goto 0
end sub


--
Regards
Frank Kabel
Frankfurt, Germany


Eric wrote:
Do any of you happen to know of any code that will
unprotect an Excel sheet when run?

The password will be input by the user in a designated
cell.

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Macro to Unprotect Sheet

I was afraid I wasn't going to explain this clearly.

I have a sheet called Home. On this sheet, a user enters
their user name and password. There is a corresponding
sheet with that users name. I have a button that the user
will push after entering their username and password that
directs them to their password protected sheet. This gets
me to that sheet but does not unprotect the sheet.

Public Sub Button11_Click()
On Error Resume Next
Worksheets(Range("E5").Text).Activate
On Error GoTo 0
End Sub


I wanted to continue with the code so that the password
entered by the user in cell 'Home'!E7 will unprotect the
corresponding sheet so the user can make edits.

Thanks

-----Original Message-----
Hi
maybe something like

sub foo()
on error resume next
with activesheet
.unprotect password:= .range("A1").value
end with
on error goto 0
end sub


--
Regards
Frank Kabel
Frankfurt, Germany


Eric wrote:
Do any of you happen to know of any code that will
unprotect an Excel sheet when run?

The password will be input by the user in a designated
cell.

Thanks

.

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
unprotect sheet macro belvy123 Excel Discussion (Misc queries) 2 March 27th 08 10:36 PM
unprotect sheet macro belvy123 Excel Discussion (Misc queries) 1 March 27th 08 10:32 PM
Code to protect/unprotect a sheet using a macro with password FredH Excel Discussion (Misc queries) 5 October 23rd 07 04:49 PM
Macro to Unprotect sheet!? Neo1 Excel Worksheet Functions 5 March 28th 06 05:50 PM
Protect/Unprotect Sheet from Macro Nigel[_8_] Excel Programming 1 May 14th 04 05:55 PM


All times are GMT +1. The time now is 04:43 AM.

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"