Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Macro to Unprotect sheet!?
Hello I'm quite stuck, I'm trying to create a macro while the worksheet is protected and the thing is i click unprotect and the password dialogue box appears asking me to enter password which is fine, but can i create a macro so that when it is played it opens this dialogue box for me to enter password to unprotect sheet? Thanks a lot From John -- Neo1 ------------------------------------------------------------------------ Neo1's Profile: http://www.excelforum.com/member.php...o&userid=30329 View this thread: http://www.excelforum.com/showthread...hreadid=526090 |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Macro to Unprotect sheet!?
try this: Code: -------------------- Sub Unprotect sheet() 'Private Sub CommandButton1_Click() ' unprotect Macro ActiveSheet.unprotect End Sub -------------------- If you want to assign this to a button, uncomment the Private Sub line and comment out (or remove) the Sub line. HTH Bruce -- swatsp0p ------------------------------------------------------------------------ swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101 View this thread: http://www.excelforum.com/showthread...hreadid=526090 |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Macro to Unprotect sheet!?
I dont understand ...what do you mean? do i need to use VB code for it? Thanks a lot From John -- Neo1 ------------------------------------------------------------------------ Neo1's Profile: http://www.excelforum.com/member.php...o&userid=30329 View this thread: http://www.excelforum.com/showthread...hreadid=526090 |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Macro to Unprotect sheet!?
Any help to create a macro to unprotect worksheet but before it does to pop up the dialogue box asking user to enter password to unprotect worksheet? I need help pleasee Thanks a lot From John -- Neo1 ------------------------------------------------------------------------ Neo1's Profile: http://www.excelforum.com/member.php...o&userid=30329 View this thread: http://www.excelforum.com/showthread...hreadid=526090 |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Macro to Unprotect sheet!?
Neo1 Wrote: Any help to create a macro to unprotect worksheet but before it does to pop up the dialogue box asking user to enter password to unprotect worksheet? I need help pleasee Thanks a lot From JohnHi Neo1, It sounds like you want the sheet to automaticaly unprotect with a password. If this is so, Just add to Bruce's code for the password. Put this in the Module for the sheet in question. Right Click on the worksheet tab and select "View Code". Paste the folowing code there. Don't forget to replace your password where it says "your password goes here" Private Sub Worksheet_Activate() ActiveSheet.Unprotect Password:=your password goes here End Sub Same thing without a password: Private Sub Worksheet_Activate() ActiveSheet.Unprotect End Sub -- Desert Piranha ------------------------------------------------------------------------ Desert Piranha's Profile: http://www.excelforum.com/member.php...o&userid=28934 View this thread: http://www.excelforum.com/showthread...hreadid=526090 |
#6
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Macro to Unprotect sheet!?
yeah ok thanks...but how do i apply it to a button so that whenever i need to click the unprotect button for the sheet.... and also how can i make it so that each worksheet has a different password to unprotect it? Thanks a lot From John -- Neo1 ------------------------------------------------------------------------ Neo1's Profile: http://www.excelforum.com/member.php...o&userid=30329 View this thread: http://www.excelforum.com/showthread...hreadid=526090 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
apply a macro to all sheets except for a certain sheet | Excel Discussion (Misc queries) | |||
macro sheet select | Excel Discussion (Misc queries) | |||
Closing File Error | Excel Discussion (Misc queries) | |||
Unprotect sheet when printing | Excel Discussion (Misc queries) | |||
2 questions, copying data from sheet to sheet and assigning macro | Excel Worksheet Functions |