Kamis, 15 Mei 2014

Re: [ExcelVBA] how to disable paste option

 

Dear All

I think that Manikandan Raghavan is looking for a workaround for the way Excel validation is defeated easily by pasting or dragging.

One approach is to override all the relevant keystrokes with code in the worksheet module like Application.OnKey "^v", "MyPasteValues". 
If you have several days to spare you can look here for ideas :- http://www.jkp-ads.com/articles/catchpaste.asp . 
I did not get as far as finding out how that code defeats right click, tool bar and menu items if at all.

I had the same problem a while ago and ended up writing my own validation routines triggered by the various worksheet  change events. This also is complicated because you have to keep a copy of the old values and then look through the speadsheet for all relevant changed values each time any single change event is fired.

Usually I like to be more helpful.

Regards

Derek Turner
England
+++







From: "twlewis@reagan.com [ExcelVBA]" <ExcelVBA@yahoogroups.com>
To: ExcelVBA@yahoogroups.com 
Cc: excelvba@yahoogroups.com
Sent: Thursday, 15 May 2014, 13:56
Subject: RE: [ExcelVBA] how to disable paste option

 
 Manikandan,
If the sheet is protected, it should not allow a paste to be performed.
I tried replicating the symptoms by opening two spreadsheets.  I protect one, and then copied a cell of data from the other.  When I try to paste it to the protected one, it does not allow it.  My question is, does your code possible have an "unprotect" somewhere?
 
Tim
 
-----Original Message-----
From: "Raghavan Manikandan geethanjali_mani@yahoo.com [ExcelVBA]" <ExcelVBA@yahoogroups.com>
Sent: Thursday, May 15, 2014 12:21am
To: ExcelVBA@yahoogroups.com
Subject: [ExcelVBA] how to disable paste option

 
HI Team,
 
Recently I experienced with an issue with the pasting the values from the different excel file which replaces the validated cells.
  
I have given below the details of the issue I have seen in my macro file :-
  
1)     There are few cells in the excel file which is having the validation wherein I need to select the values which I have given in the validation cells.
  
2)     When a person who copies the data from other excel file he could able to paste it directly in the validation cells in the existing file which replaces the validation option and the value which was not listed in the validation cells.
  
3)     The Excel sheet is protected.
 
Please advise me how to disable the paste option (Ctrl +v, right click and paste etc.,) for the respective excel file to avoid this kind of issues.
 
Regards
Manikandan Raghavan


__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (3)

----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.

----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA

----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com

----------------------------------

.

__,_._,___

Tidak ada komentar:

Posting Komentar