Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default problem: when paste = validations lost = excel corrupted !


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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help, Excel Files Being Wiped Out: Data Lost or Corrupted Mister Softie Excel Worksheet Functions 5 October 17th 07 08:06 PM
Excel cut/Paste Problem: Year changes after data is copy and paste Asif Excel Discussion (Misc queries) 2 December 9th 05 05:16 PM
Lost my Paste Mike R Excel Discussion (Misc queries) 11 August 29th 05 12:22 AM
Copy and Paste Lost Gord Dibben[_3_] Excel Programming 0 July 9th 03 01:21 AM
Copy and Paste lost Wes[_2_] Excel Programming 1 July 8th 03 11:31 PM


All times are GMT +1. The time now is 07:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"