ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   how to disable copy paste buttons from from edit menu (https://www.excelbanter.com/excel-discussion-misc-queries/122184-how-disable-copy-paste-buttons-edit-menu.html)

excel test

how to disable copy paste buttons from from edit menu
 
how to disable copy paste buttons from from edit menu only for a given
workbook?

Jim Thomlinson

how to disable copy paste buttons from from edit menu
 
Not easily. It requires a fair bit of VBA code including event coding and
strong error handling to ensure that the Copy Paste functionallity always
gets restored no matter what. Unless you are fairly confident in your VBA I
would recomend against it. what might be easier would be to add this code
which cancels a copy when the cursor is moved...

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Application.CutCopyMode = False
End Sub

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
As Range)
Application.CutCopyMode = False
End Sub


Add this code to ThisWorkbook (Right click the Excel Icon next to File in
the Menu and select View Code... Paste the above code.)
--
HTH...

Jim Thomlinson


"excel test" wrote:

how to disable copy paste buttons from from edit menu only for a given
workbook?


CSK

how to disable copy paste buttons from from edit menu
 
This worked great to disable folks from copying and pasting. But what is the
code to re-enable copy paste and where do I put the code so that I have the
ability to re-enable copy and paste.

Thanks

"Jim Thomlinson" wrote:

Not easily. It requires a fair bit of VBA code including event coding and
strong error handling to ensure that the Copy Paste functionallity always
gets restored no matter what. Unless you are fairly confident in your VBA I
would recomend against it. what might be easier would be to add this code
which cancels a copy when the cursor is moved...

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Application.CutCopyMode = False
End Sub

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
As Range)
Application.CutCopyMode = False
End Sub


Add this code to ThisWorkbook (Right click the Excel Icon next to File in
the Menu and select View Code... Paste the above code.)
--
HTH...

Jim Thomlinson


"excel test" wrote:

how to disable copy paste buttons from from edit menu only for a given
workbook?



All times are GMT +1. The time now is 10:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com