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 !


hello,

I made an excel worksheet for out customers.

First everything went ok, but now they have a guy who does constantly
paste from other worksheets. The problem is on our excel sheet, several
columns have validations and when the user copys cells from other
sheets, excel also copies the validation.
= this has made our excel sheet corrupted already several times and we
needed to deliver the original one.

I told him so much: you must do: "paste values" instead of just
"paste", but i think he just likes teasing us.

so, now I'm thinking: isn't there a way in excel to do the following:
- disable all normal exel paste functionality (ctrl V, toobar, menu)
- only allow "paste values" in menubar and toolbar.
- when users do ctrl V: excel does immediately paste values instead of
normal paste.

since i'm not really an excel expert, i hope those three things are
possible. if i need to do some VBA programming, no problems.

thanks in advance


--
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

  #2   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:19 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"