Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have the option of cells protected and the sheet with password.
But, how do I protect unprotected cells of users from using the option copy-cut-paste? Thanks!! JPG |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
when you protect the sheet, you tell excel what you will allow the users to do if you don't check anything they will not able to cut or paste just read "juanpablo" wrote: I have the option of cells protected and the sheet with password. But, how do I protect unprotected cells of users from using the option copy-cut-paste? Thanks!! JPG |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Yes but in all the options it does not appear one that specifies cut.copy and
paste. JPG "Eduardo" wrote: Hi, when you protect the sheet, you tell excel what you will allow the users to do if you don't check anything they will not able to cut or paste just read "juanpablo" wrote: I have the option of cells protected and the sheet with password. But, how do I protect unprotected cells of users from using the option copy-cut-paste? Thanks!! JPG |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi Juanpablo,
If you unprotect the cells when protecting the sheet they will be able to copy and paste "juanpablo" wrote: Yes but in all the options it does not appear one that specifies cut.copy and paste. JPG "Eduardo" wrote: Hi, when you protect the sheet, you tell excel what you will allow the users to do if you don't check anything they will not able to cut or paste just read "juanpablo" wrote: I have the option of cells protected and the sheet with password. But, how do I protect unprotected cells of users from using the option copy-cut-paste? Thanks!! JPG |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You cannot stop users from acting upon unlocked cells in a protected sheet.
That is.........without the use of VBA code. Gord Dibben MS Excel MVP On Tue, 27 Apr 2010 07:56:02 -0700, juanpablo wrote: I have the option of cells protected and the sheet with password. But, how do I protect unprotected cells of users from using the option copy-cut-paste? Thanks!! JPG |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Yes, I found VBA code that works fine, the problem now is that the book is
shared. JP "Gord Dibben" wrote: You cannot stop users from acting upon unlocked cells in a protected sheet. That is.........without the use of VBA code. Gord Dibben MS Excel MVP On Tue, 27 Apr 2010 07:56:02 -0700, juanpablo wrote: I have the option of cells protected and the sheet with password. But, how do I protect unprotected cells of users from using the option copy-cut-paste? Thanks!! JPG . |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Too bad.
One of the many problems with shared workbooks. Post the code.............there may be a way but if it involves unprotect then reprotect you are out of luck. Gord On Tue, 27 Apr 2010 11:38:01 -0700, juanpablo wrote: Yes, I found VBA code that works fine, the problem now is that the book is shared. JP "Gord Dibben" wrote: You cannot stop users from acting upon unlocked cells in a protected sheet. That is.........without the use of VBA code. Gord Dibben MS Excel MVP On Tue, 27 Apr 2010 07:56:02 -0700, juanpablo wrote: I have the option of cells protected and the sheet with password. But, how do I protect unprotected cells of users from using the option copy-cut-paste? Thanks!! JPG . |
#8
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Im using this one:
Option Explicit Sub ToggleCutCopyAndPaste(Allow As Boolean) 'Activate/deactivate cut, copy, paste and pastespecial menu items Call EnableMenuItem(21, Allow) ' cut Call EnableMenuItem(19, Allow) ' copy Call EnableMenuItem(22, Allow) ' paste Call EnableMenuItem(755, Allow) ' pastespecial 'Activate/deactivate drag and drop ability Application.CellDragAndDrop = Allow 'Activate/deactivate cut, copy, paste and pastespecial shortcut keys With Application Select Case Allow Case Is = False .OnKey "^c", "CutCopyPasteDisabled" .OnKey "^v", "CutCopyPasteDisabled" .OnKey "^x", "CutCopyPasteDisabled" .OnKey "+{DEL}", "CutCopyPasteDisabled" .OnKey "^{INSERT}", "CutCopyPasteDisabled" Case Is = True .OnKey "^c" .OnKey "^v" .OnKey "^x" .OnKey "+{DEL}" .OnKey "^{INSERT}" End Select End With End Sub Sub EnableMenuItem(ctlId As Integer, Enabled As Boolean) 'Activate/Deactivate specific menu item Dim cBar As CommandBar Dim cBarCtrl As CommandBarControl For Each cBar In Application.CommandBars If cBar.Name < "Clipboard" Then Set cBarCtrl = cBar.FindControl(ID:=ctlId, recursive:=True) If Not cBarCtrl Is Nothing Then cBarCtrl.Enabled = Enabled End If Next End Sub Sub CutCopyPasteDisabled() 'Inform user that the functions have been disabled MsgBox "Sorry! Cutting, copying and pasting have been disabled in this workbook!" End Sub and called on the workbook: Option Explicit Private Sub Workbook_Activate() Call ToggleCutCopyAndPaste(False) End Sub Private Sub Workbook_BeforeClose(Cancel As Boolean) Call ToggleCutCopyAndPaste(True) End Sub Private Sub Workbook_Deactivate() Call ToggleCutCopyAndPaste(True) End Sub Private Sub Workbook_Open() Call ToggleCutCopyAndPaste(False) End Sub "Gord Dibben" <gorddibbATshawDOTca escribió en el mensaje ... Too bad. One of the many problems with shared workbooks. Post the code.............there may be a way but if it involves unprotect then reprotect you are out of luck. Gord On Tue, 27 Apr 2010 11:38:01 -0700, juanpablo wrote: Yes, I found VBA code that works fine, the problem now is that the book is shared. JP "Gord Dibben" wrote: You cannot stop users from acting upon unlocked cells in a protected sheet. That is.........without the use of VBA code. Gord Dibben MS Excel MVP On Tue, 27 Apr 2010 07:56:02 -0700, juanpablo wrote: I have the option of cells protected and the sheet with password. But, how do I protect unprotected cells of users from using the option copy-cut-paste? Thanks!! JPG . |
#9
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
What exactly does it not do that makes it a problem for you?
In Excel 2003 your code disables cut/copy etc. when opened or activated. Reenables when workbook is de-activated or closed. With workbook shared and sheet protection enabled on multiple sheets. Gord On Wed, 28 Apr 2010 10:49:04 -0500, "Juan Pablo Gallardo" wrote: Im using this one: Option Explicit Sub ToggleCutCopyAndPaste(Allow As Boolean) 'Activate/deactivate cut, copy, paste and pastespecial menu items Call EnableMenuItem(21, Allow) ' cut Call EnableMenuItem(19, Allow) ' copy Call EnableMenuItem(22, Allow) ' paste Call EnableMenuItem(755, Allow) ' pastespecial 'Activate/deactivate drag and drop ability Application.CellDragAndDrop = Allow 'Activate/deactivate cut, copy, paste and pastespecial shortcut keys With Application Select Case Allow Case Is = False .OnKey "^c", "CutCopyPasteDisabled" .OnKey "^v", "CutCopyPasteDisabled" .OnKey "^x", "CutCopyPasteDisabled" .OnKey "+{DEL}", "CutCopyPasteDisabled" .OnKey "^{INSERT}", "CutCopyPasteDisabled" Case Is = True .OnKey "^c" .OnKey "^v" .OnKey "^x" .OnKey "+{DEL}" .OnKey "^{INSERT}" End Select End With End Sub Sub EnableMenuItem(ctlId As Integer, Enabled As Boolean) 'Activate/Deactivate specific menu item Dim cBar As CommandBar Dim cBarCtrl As CommandBarControl For Each cBar In Application.CommandBars If cBar.Name < "Clipboard" Then Set cBarCtrl = cBar.FindControl(ID:=ctlId, recursive:=True) If Not cBarCtrl Is Nothing Then cBarCtrl.Enabled = Enabled End If Next End Sub Sub CutCopyPasteDisabled() 'Inform user that the functions have been disabled MsgBox "Sorry! Cutting, copying and pasting have been disabled in this workbook!" End Sub and called on the workbook: Option Explicit Private Sub Workbook_Activate() Call ToggleCutCopyAndPaste(False) End Sub Private Sub Workbook_BeforeClose(Cancel As Boolean) Call ToggleCutCopyAndPaste(True) End Sub Private Sub Workbook_Deactivate() Call ToggleCutCopyAndPaste(True) End Sub Private Sub Workbook_Open() Call ToggleCutCopyAndPaste(False) End Sub "Gord Dibben" <gorddibbATshawDOTca escribió en el mensaje .. . Too bad. One of the many problems with shared workbooks. Post the code.............there may be a way but if it involves unprotect then reprotect you are out of luck. Gord On Tue, 27 Apr 2010 11:38:01 -0700, juanpablo wrote: Yes, I found VBA code that works fine, the problem now is that the book is shared. JP "Gord Dibben" wrote: You cannot stop users from acting upon unlocked cells in a protected sheet. That is.........without the use of VBA code. Gord Dibben MS Excel MVP On Tue, 27 Apr 2010 07:56:02 -0700, juanpablo wrote: I have the option of cells protected and the sheet with password. But, how do I protect unprotected cells of users from using the option copy-cut-paste? Thanks!! JPG . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
protect cells in excel, but also allow a search in those cells? | Excel Worksheet Functions | |||
How do I protect cells or a range of cells in excel spreadsheet? | Excel Worksheet Functions | |||
Protect only certain Cells? | Excel Discussion (Misc queries) | |||
Protect cells | Excel Discussion (Misc queries) | |||
protect cells in csv | Excel Worksheet Functions |