Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() Hi, i searched the forum and found a post on how to protect the workbook, which is what i wanted. "Try Tools - Options - Security tab to assign passwords to modify or open the workbook" However, i want to be able to open the workbook without entering a password, but the user can't modify/change anything. Heres a clearer picture, i got a workbook called A and there are two macros which leads to this workbook. 1-opens it and locks the workbook for protection 2-need to enter a password to insert layout lines etc. So does anyone know how to protect the workbook from modify but could be read? or is there a macro code for it as im making macros (sorry for the wrong section post if this is a macro case :( ) thanks in advance, Bonbon -- Bonbon ------------------------------------------------------------------------ Bonbon's Profile: http://www.excelforum.com/member.php...o&userid=31866 View this thread: http://www.excelforum.com/showthread...hreadid=535932 |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Not sure if I'm understanding your question correct but....
If you choose from the menu path File / Save As and then from the Save As dialogue box choose Tools / General Options you will get a dialogue box that will allow you to enter a password to modify. If you set that all up....when users open the file they will be prompted to either enter a password to modify/edit the file OR open the file as read only. That way users who do not have the password will be able to open the file in a read mode and user who do have the password will be able to edit the file. Will this do it for you? Bill Horton "Bonbon" wrote: Hi, i searched the forum and found a post on how to protect the workbook, which is what i wanted. "Try Tools - Options - Security tab to assign passwords to modify or open the workbook" However, i want to be able to open the workbook without entering a password, but the user can't modify/change anything. Heres a clearer picture, i got a workbook called A and there are two macros which leads to this workbook. 1-opens it and locks the workbook for protection 2-need to enter a password to insert layout lines etc. So does anyone know how to protect the workbook from modify but could be read? or is there a macro code for it as im making macros (sorry for the wrong section post if this is a macro case :( ) thanks in advance, Bonbon -- Bonbon ------------------------------------------------------------------------ Bonbon's Profile: http://www.excelforum.com/member.php...o&userid=31866 View this thread: http://www.excelforum.com/showthread...hreadid=535932 |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() erm the thing is, i dont want t abox to appear asking for pw, i just need a macro code to lock the whole workbook once workbook is opened so nobody can modify it. is there a way? sorry for the hassle, Bonbon William Horton Wrote: Not sure if I'm understanding your question correct but.... If you choose from the menu path File / Save As and then from the Save As dialogue box choose Tools / General Options you will get a dialogue box that will allow you to enter a password to modify. If you set that all up....when users open the file they will be prompted to either enter a password to modify/edit the file OR open the file as read only. That way users who do not have the password will be able to open the file in a read mode and user who do have the password will be able to edit the file. Will this do it for you? Bill Horton "Bonbon" wrote: Hi, i searched the forum and found a post on how to protect the workbook, which is what i wanted. "Try Tools - Options - Security tab to assign passwords to modify or open the workbook" However, i want to be able to open the workbook without entering a password, but the user can't modify/change anything. Heres a clearer picture, i got a workbook called A and there are two macros which leads to this workbook. 1-opens it and locks the workbook for protection 2-need to enter a password to insert layout lines etc. So does anyone know how to protect the workbook from modify but could be read? or is there a macro code for it as im making macros (sorry for the wrong section post if this is a macro case :( ) thanks in advance, Bonbon -- Bonbon ------------------------------------------------------------------------ Bonbon's Profile: http://www.excelforum.com/member.php...o&userid=31866 View this thread: http://www.excelforum.com/showthread...hreadid=535932 -- Bonbon ------------------------------------------------------------------------ Bonbon's Profile: http://www.excelforum.com/member.php...o&userid=31866 View this thread: http://www.excelforum.com/showthread...hreadid=535932 |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
To lock workbook or worksheets go to ToolsProtectionProtect Workbook or
Protect Worksheet. Neither of these will lock the workbook from opening, but can protect from modification. Should not require a macro. Just save the workbook with protection set to "locked" Gord Dibben MS Excel MVP On Tue, 25 Apr 2006 11:59:53 -0500, Bonbon wrote: erm the thing is, i dont want t abox to appear asking for pw, i just need a macro code to lock the whole workbook once workbook is opened so nobody can modify it. is there a way? sorry for the hassle, Bonbon William Horton Wrote: Not sure if I'm understanding your question correct but.... If you choose from the menu path File / Save As and then from the Save As dialogue box choose Tools / General Options you will get a dialogue box that will allow you to enter a password to modify. If you set that all up....when users open the file they will be prompted to either enter a password to modify/edit the file OR open the file as read only. That way users who do not have the password will be able to open the file in a read mode and user who do have the password will be able to edit the file. Will this do it for you? Bill Horton "Bonbon" wrote: Hi, i searched the forum and found a post on how to protect the workbook, which is what i wanted. "Try Tools - Options - Security tab to assign passwords to modify or open the workbook" However, i want to be able to open the workbook without entering a password, but the user can't modify/change anything. Heres a clearer picture, i got a workbook called A and there are two macros which leads to this workbook. 1-opens it and locks the workbook for protection 2-need to enter a password to insert layout lines etc. So does anyone know how to protect the workbook from modify but could be read? or is there a macro code for it as im making macros (sorry for the wrong section post if this is a macro case :( ) thanks in advance, Bonbon -- Bonbon ------------------------------------------------------------------------ Bonbon's Profile: http://www.excelforum.com/member.php...o&userid=31866 View this thread: http://www.excelforum.com/showthread...hreadid=535932 |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() Dear Gord, i have tried the protect workbook many times but everytime i could still modify it. Then i checked the Window box to try, but that was not what i wanted. Is there a way to select all the wrksheets? so i can just 'protect wrksheet' whilst selecting all the sheets or grouping them because the only protection i got to work, was the protect wrksheet one, never the protect wrkbook. Thx Bon -- Bonbon ------------------------------------------------------------------------ Bonbon's Profile: http://www.excelforum.com/member.php...o&userid=31866 View this thread: http://www.excelforum.com/showthread...hreadid=535932 |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
You have to protect each worksheet one at a time unless you use VBA macro to do
them all at once. Code for that follows............ Sub ProtectAllSheets() Application.ScreenUpdating = False Dim n As Single For n = 1 To Sheets.Count Sheets(n).Protect Password:="justme" Next n Application.ScreenUpdating = True End Sub Sub UnprotectAllSheets() Application.ScreenUpdating = False Dim n As Single For n = 1 To Sheets.Count Sheets(n).Unprotect Password:="justme" Next n Application.ScreenUpdating = True End Sub If not familiar with VBA and macros, see David McRitchie's site for more on "getting started". http://www.mvps.org/dmcritchie/excel/getstarted.htm In the meantime.......... First...create a backup copy of your original workbook. To create a General Module, hit ALT + F11 to open the Visual Basic Editor. Hit CRTL + R to open Project Explorer. Find your workbook/project and select it. Right-click and InsertModule. Paste the code in there. Save the workbook and hit ALT + Q to return to your workbook. Run the macros by going to ToolMacroMacros. You can also assign these macros to a button or a shortcut key combo Gord On Tue, 25 Apr 2006 14:57:36 -0500, Bonbon wrote: Dear Gord, i have tried the protect workbook many times but everytime i could still modify it. Then i checked the Window box to try, but that was not what i wanted. Is there a way to select all the wrksheets? so i can just 'protect wrksheet' whilst selecting all the sheets or grouping them because the only protection i got to work, was the protect wrksheet one, never the protect wrkbook. Thx Bon Gord Dibben MS Excel MVP |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Loop time seems dependent on unrelated workbook - Why? | Excel Worksheet Functions | |||
How can I remove workbook protection with no password? | Excel Discussion (Misc queries) | |||
how can i remove workbook protection setting??? | Excel Discussion (Misc queries) | |||
How to hyperlink from a workbook to sheets in another workbook? | Excel Worksheet Functions | |||
Unprotect Workbook | Excel Discussion (Misc queries) |