Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() i found this already and it works fine, but I'm more looking for the following: - set "paste values" by default instead of normal paste? - disallow normal paste, but allow "paste values". - when user does ctrl V: excel does automatically "paste values"? Code: -------------------- Private Sub CommandButton1_Click() ' Add this code in the Workbook_Activate event ' it will load every time the workbook is activated ' Turn off the menu Application.CommandBars("Edit").Controls(3).Enable d = False Application.CommandBars("Edit").Controls(4).Enable d = False 'copy Application.CommandBars("Edit").Controls(5).Enable d = False Application.CommandBars("Edit").Controls(6).Enable d = False ' Turn off the toolbar: Application.CommandBars("Standard").Controls(7).En abled = False Application.CommandBars("Standard").Controls(8).En abled = False 'Application.CommandBars("Standard").Controls(9).E nabled = False 'copy Application.CommandBars("Standard").Controls(10).E nabled = False ' turn off shortcutkeys: 'Application.OnKey "^c", "" Application.OnKey "^v", "" Application.OnKey "^x", "" End Sub Private Sub CommandButton2_Click() ' Add this code in the Workbook_Activate event ' it will load every time the workbook is de-activated ' Enable the menu: Application.CommandBars("Edit").Controls(3).Enable d = True Application.CommandBars("Edit").Controls(4).Enable d = True Application.CommandBars("Edit").Controls(5).Enable d = True Application.CommandBars("Edit").Controls(6).Enable d = True ' Enable the commandbar: Application.CommandBars("Standard").Controls(7).En abled = True Application.CommandBars("Standard").Controls(8).En abled = True Application.CommandBars("Standard").Controls(9).En abled = True Application.CommandBars("Standard").Controls(10).E nabled = True ' Enable the shortcut keys: Application.OnKey "^c" Application.OnKey "^v" Application.OnKey "^x" End Sub -------------------- -- stt_d31 ------------------------------------------------------------------------ stt_d31's Profile: http://www.excelforum.com/member.php...o&userid=24040 View this thread: http://www.excelforum.com/showthread...hreadid=376492 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help, Excel Files Being Wiped Out: Data Lost or Corrupted | Excel Worksheet Functions | |||
Excel cut/Paste Problem: Year changes after data is copy and paste | Excel Discussion (Misc queries) | |||
Lost my Paste | Excel Discussion (Misc queries) | |||
Copy and Paste Lost | Excel Programming | |||
Copy and Paste lost | Excel Programming |