Bon courage
Je réitère !
il ny a pas d'astuce mais des programmes VBA pour pouvoir interdire le
copier-coller sont nombreux.
Le nombre d'instructions à passer est important car le nombre de manières
de copier-coller sous Excel est très riche. Je t'indique une manière parmi
Il te faut placer ce code dans le module Thisworkbook dans la proédure
évenementielle Open
On Error Resume Next
With Application
'disables shortcut keys
.OnKey "^c", ""
.OnKey "^v", ""
.OnKey "^x", ""
'Disables Copy
.CommandBars("Edit").FindControl(ID:).Enabled = False
.CommandBars("Edit").FindControl(ID:8).Enabled = False
.CommandBars("Cell").FindControl(ID:).Enabled = False
.CommandBars("Column").FindControl(ID:).Enabled = False
.CommandBars("Row").FindControl(ID:).Enabled = False
.CommandBars("Button").FindControl(ID:).Enabled = False
.CommandBars("Formula Bar").FindControl(ID:).Enabled = False
.CommandBars("Worksheet Menu Bar").FindControl(ID:).Enabled = False
.CommandBars("Standard").FindControl(ID:).Enabled = False
.CommandBars("Button").FindControl(ID:8).Enabled = False
.CommandBars("Formula Bar").FindControl(ID:8).Enabled = False
.CommandBars("Worksheet Menu Bar").FindControl(ID:8).Enabled False
.CommandBars("Standard").FindControl(ID:8).Enabled = False
.CommandBars("Ply").FindControl(ID:8).Enabled = False
'Disables Cut
.CommandBars("Edit").FindControl(ID:!).Enabled = False
.CommandBars("Cell").FindControl(ID:!).Enabled = False
.CommandBars("Column").FindControl(ID:!).Enabled = False
.CommandBars("Row").FindControl(ID:!).Enabled = False
.CommandBars("Button").FindControl(ID:!).Enabled = False
.CommandBars("Formula Bar").FindControl(ID:!).Enabled = False
.CommandBars("Worksheet Menu Bar").FindControl(ID:!).Enabled = False
.CommandBars("Standard").FindControl(ID:!).Enabled = False
End With
si tu veux rétablir les commandes mettre dans la procdure evenenmentielle
before close de THisworkbook les commandes suivantes
On Error Resume Next
With Application
.OnKey "^c"
.OnKey "^v"
.OnKey "^x"
'Enables Copy
.CommandBars("Edit").FindControl(ID:).Enabled = True
.CommandBars("Edit").FindControl(ID:8).Enabled = True
.CommandBars("Cell").FindControl(ID:).Enabled = True
.CommandBars("Column").FindControl(ID:).Enabled = True
.CommandBars("Row").FindControl(ID:).Enabled = True
.CommandBars("Button").FindControl(ID:).Enabled = True
.CommandBars("Formula Bar").FindControl(ID:).Enabled = True
.CommandBars("Worksheet Menu Bar").FindControl(ID:).Enabled = True
.CommandBars("Standard").FindControl(ID:).Enabled = True
.CommandBars("Button").FindControl(ID:8).Enabled = True
.CommandBars("Formula Bar").FindControl(ID:8).Enabled = True
.CommandBars("Worksheet Menu Bar").FindControl(ID:8).Enabled = True
.CommandBars("Standard").FindControl(ID:8).Enabled = True
.CommandBars("Ply").FindControl(ID:8).Enabled = True
' Enables Cut
.CommandBars("Edit").FindControl(ID:!).Enabled = True
.CommandBars("Cell").FindControl(ID:!).Enabled = True
.CommandBars("Column").FindControl(ID:!).Enabled = True
.CommandBars("Row").FindControl(ID:!).Enabled = True
.CommandBars("Button").FindControl(ID:!).Enabled = True
.CommandBars("Formula Bar").FindControl(ID:!).Enabled = True
.CommandBars("Worksheet Menu Bar").FindControl(ID:!).Enabled = True
.CommandBars("Standard").FindControl(ID:!).Enabled = True
End With
Bon courage
Bon courage
Je réitère !
il ny a pas d'astuce mais des programmes VBA pour pouvoir interdire le
copier-coller sont nombreux.
Le nombre d'instructions à passer est important car le nombre de manières
de copier-coller sous Excel est très riche. Je t'indique une manière parmi
Il te faut placer ce code dans le module Thisworkbook dans la proédure
évenementielle Open
On Error Resume Next
With Application
'disables shortcut keys
.OnKey "^c", ""
.OnKey "^v", ""
.OnKey "^x", ""
'Disables Copy
.CommandBars("Edit").FindControl(ID:).Enabled = False
.CommandBars("Edit").FindControl(ID:8).Enabled = False
.CommandBars("Cell").FindControl(ID:).Enabled = False
.CommandBars("Column").FindControl(ID:).Enabled = False
.CommandBars("Row").FindControl(ID:).Enabled = False
.CommandBars("Button").FindControl(ID:).Enabled = False
.CommandBars("Formula Bar").FindControl(ID:).Enabled = False
.CommandBars("Worksheet Menu Bar").FindControl(ID:).Enabled = False
.CommandBars("Standard").FindControl(ID:).Enabled = False
.CommandBars("Button").FindControl(ID:8).Enabled = False
.CommandBars("Formula Bar").FindControl(ID:8).Enabled = False
.CommandBars("Worksheet Menu Bar").FindControl(ID:8).Enabled False
.CommandBars("Standard").FindControl(ID:8).Enabled = False
.CommandBars("Ply").FindControl(ID:8).Enabled = False
'Disables Cut
.CommandBars("Edit").FindControl(ID:!).Enabled = False
.CommandBars("Cell").FindControl(ID:!).Enabled = False
.CommandBars("Column").FindControl(ID:!).Enabled = False
.CommandBars("Row").FindControl(ID:!).Enabled = False
.CommandBars("Button").FindControl(ID:!).Enabled = False
.CommandBars("Formula Bar").FindControl(ID:!).Enabled = False
.CommandBars("Worksheet Menu Bar").FindControl(ID:!).Enabled = False
.CommandBars("Standard").FindControl(ID:!).Enabled = False
End With
si tu veux rétablir les commandes mettre dans la procdure evenenmentielle
before close de THisworkbook les commandes suivantes
On Error Resume Next
With Application
.OnKey "^c"
.OnKey "^v"
.OnKey "^x"
'Enables Copy
.CommandBars("Edit").FindControl(ID:).Enabled = True
.CommandBars("Edit").FindControl(ID:8).Enabled = True
.CommandBars("Cell").FindControl(ID:).Enabled = True
.CommandBars("Column").FindControl(ID:).Enabled = True
.CommandBars("Row").FindControl(ID:).Enabled = True
.CommandBars("Button").FindControl(ID:).Enabled = True
.CommandBars("Formula Bar").FindControl(ID:).Enabled = True
.CommandBars("Worksheet Menu Bar").FindControl(ID:).Enabled = True
.CommandBars("Standard").FindControl(ID:).Enabled = True
.CommandBars("Button").FindControl(ID:8).Enabled = True
.CommandBars("Formula Bar").FindControl(ID:8).Enabled = True
.CommandBars("Worksheet Menu Bar").FindControl(ID:8).Enabled = True
.CommandBars("Standard").FindControl(ID:8).Enabled = True
.CommandBars("Ply").FindControl(ID:8).Enabled = True
' Enables Cut
.CommandBars("Edit").FindControl(ID:!).Enabled = True
.CommandBars("Cell").FindControl(ID:!).Enabled = True
.CommandBars("Column").FindControl(ID:!).Enabled = True
.CommandBars("Row").FindControl(ID:!).Enabled = True
.CommandBars("Button").FindControl(ID:!).Enabled = True
.CommandBars("Formula Bar").FindControl(ID:!).Enabled = True
.CommandBars("Worksheet Menu Bar").FindControl(ID:!).Enabled = True
.CommandBars("Standard").FindControl(ID:!).Enabled = True
End With
Bon courage
Bon courage
Je réitère !
il ny a pas d'astuce mais des programmes VBA pour pouvoir interdire le
copier-coller sont nombreux.
Le nombre d'instructions à passer est important car le nombre de manières
de copier-coller sous Excel est très riche. Je t'indique une manière parmi
Il te faut placer ce code dans le module Thisworkbook dans la proédure
évenementielle Open
On Error Resume Next
With Application
'disables shortcut keys
.OnKey "^c", ""
.OnKey "^v", ""
.OnKey "^x", ""
'Disables Copy
.CommandBars("Edit").FindControl(ID:).Enabled = False
.CommandBars("Edit").FindControl(ID:8).Enabled = False
.CommandBars("Cell").FindControl(ID:).Enabled = False
.CommandBars("Column").FindControl(ID:).Enabled = False
.CommandBars("Row").FindControl(ID:).Enabled = False
.CommandBars("Button").FindControl(ID:).Enabled = False
.CommandBars("Formula Bar").FindControl(ID:).Enabled = False
.CommandBars("Worksheet Menu Bar").FindControl(ID:).Enabled = False
.CommandBars("Standard").FindControl(ID:).Enabled = False
.CommandBars("Button").FindControl(ID:8).Enabled = False
.CommandBars("Formula Bar").FindControl(ID:8).Enabled = False
.CommandBars("Worksheet Menu Bar").FindControl(ID:8).Enabled False
.CommandBars("Standard").FindControl(ID:8).Enabled = False
.CommandBars("Ply").FindControl(ID:8).Enabled = False
'Disables Cut
.CommandBars("Edit").FindControl(ID:!).Enabled = False
.CommandBars("Cell").FindControl(ID:!).Enabled = False
.CommandBars("Column").FindControl(ID:!).Enabled = False
.CommandBars("Row").FindControl(ID:!).Enabled = False
.CommandBars("Button").FindControl(ID:!).Enabled = False
.CommandBars("Formula Bar").FindControl(ID:!).Enabled = False
.CommandBars("Worksheet Menu Bar").FindControl(ID:!).Enabled = False
.CommandBars("Standard").FindControl(ID:!).Enabled = False
End With
si tu veux rétablir les commandes mettre dans la procdure evenenmentielle
before close de THisworkbook les commandes suivantes
On Error Resume Next
With Application
.OnKey "^c"
.OnKey "^v"
.OnKey "^x"
'Enables Copy
.CommandBars("Edit").FindControl(ID:).Enabled = True
.CommandBars("Edit").FindControl(ID:8).Enabled = True
.CommandBars("Cell").FindControl(ID:).Enabled = True
.CommandBars("Column").FindControl(ID:).Enabled = True
.CommandBars("Row").FindControl(ID:).Enabled = True
.CommandBars("Button").FindControl(ID:).Enabled = True
.CommandBars("Formula Bar").FindControl(ID:).Enabled = True
.CommandBars("Worksheet Menu Bar").FindControl(ID:).Enabled = True
.CommandBars("Standard").FindControl(ID:).Enabled = True
.CommandBars("Button").FindControl(ID:8).Enabled = True
.CommandBars("Formula Bar").FindControl(ID:8).Enabled = True
.CommandBars("Worksheet Menu Bar").FindControl(ID:8).Enabled = True
.CommandBars("Standard").FindControl(ID:8).Enabled = True
.CommandBars("Ply").FindControl(ID:8).Enabled = True
' Enables Cut
.CommandBars("Edit").FindControl(ID:!).Enabled = True
.CommandBars("Cell").FindControl(ID:!).Enabled = True
.CommandBars("Column").FindControl(ID:!).Enabled = True
.CommandBars("Row").FindControl(ID:!).Enabled = True
.CommandBars("Button").FindControl(ID:!).Enabled = True
.CommandBars("Formula Bar").FindControl(ID:!).Enabled = True
.CommandBars("Worksheet Menu Bar").FindControl(ID:!).Enabled = True
.CommandBars("Standard").FindControl(ID:!).Enabled = True
End With
Bon courage
Bonjour loadmaster,
Si par copier-coller, tu signifies dans le même classeur, tu peux essayer ceci. Ces lignes de code vont désactiver le
copier-coller dans tout le classeur .... mais tu pourrais toujours effectuer un copier-coller vers un autre classeur ou
une autre application. Au besoin, il y a moyen de limiter ceci à une feuille particulière.
Dans le thisworkbook de ton projet :
'----------------------
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
Application.CutCopyMode = False
End Sub
'----------------------
Salutations!
"loadmaster" a écrit dans le message de
news:
Y-a-t-il une astuce pour empecher un copier/coller de cellules non protegées dans une feuille protegée
Mci et slts
Bonjour loadmaster,
Si par copier-coller, tu signifies dans le même classeur, tu peux essayer ceci. Ces lignes de code vont désactiver le
copier-coller dans tout le classeur .... mais tu pourrais toujours effectuer un copier-coller vers un autre classeur ou
une autre application. Au besoin, il y a moyen de limiter ceci à une feuille particulière.
Dans le thisworkbook de ton projet :
'----------------------
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
Application.CutCopyMode = False
End Sub
'----------------------
Salutations!
"loadmaster" <loadmaster@discussions.microsoft.com> a écrit dans le message de
news:D209D095-9FED-4F0B-985F-7BEFD3D29F90@microsoft.com...
Y-a-t-il une astuce pour empecher un copier/coller de cellules non protegées dans une feuille protegée
Mci et slts
Bonjour loadmaster,
Si par copier-coller, tu signifies dans le même classeur, tu peux essayer ceci. Ces lignes de code vont désactiver le
copier-coller dans tout le classeur .... mais tu pourrais toujours effectuer un copier-coller vers un autre classeur ou
une autre application. Au besoin, il y a moyen de limiter ceci à une feuille particulière.
Dans le thisworkbook de ton projet :
'----------------------
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
Application.CutCopyMode = False
End Sub
'----------------------
Salutations!
"loadmaster" a écrit dans le message de
news:
Y-a-t-il une astuce pour empecher un copier/coller de cellules non protegées dans une feuille protegée
Mci et slts