Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 2
Default Data Validation Error Not Working On Paste Special Values

Hi,

I have data validation that does not permit text to be written in the cell (Basically Text Length = 0). The range of cells with this validation was renamed "ValidationRange". A macro was created so you cannot paste over the data validation and erase it (http://www.j-walk.com/ss/excel/tips/tip98.htm).

However, it does not work if someone Pastes Special Values. Can someone help me with a VBA code to make this work?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,872
Default Data Validation Error Not Working On Paste Special Values

Hi,

Am Fri, 19 Sep 2014 18:40:29 +0100 schrieb Whydidjuly:

I have data validation that does not permit text to be written in the
cell (Basically Text Length = 0). The range of cells with this
validation was renamed "ValidationRange". A macro was created so you
cannot paste over the data validation and erase it
(http://www.j-walk.com/ss/excel/tips/tip98.htm).

However, it does not work if someone Pastes Special Values. Can someone
help me with a VBA code to make this work?


you don't need DataValidation.
Try following code. With this code you cannot select a cell into the
range:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

If Not Intersect(Target, Range("ValidationRange")) Is Nothing Then
Target.Offset(, 1).Select
End If
End Sub


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Data Validation Error Not Working On Paste Special Values

Hi I'm interested if you have been able to validate phone numbers using excel. I'm just starting out and would love some ideas or better some working examples. Thanks in advance.
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
Getting Data Validation to execute when using Paste Special... Val Bob Excel Programming 3 April 30th 10 12:58 PM
Special Paste Error...Data pastes into one column School Excel Discussion (Misc queries) 1 October 17th 07 06:48 PM
Data Validation - Copypaste special problem WCM Excel Discussion (Misc queries) 2 October 24th 06 02:13 AM
Copy and paste special, values not working mcarley Excel Programming 4 March 31st 05 01:41 AM
Dynamic Copy/Paste Special Formulas/Paste Special Values Sharon Perez Excel Programming 3 August 7th 04 09:49 PM


All times are GMT +1. The time now is 08:53 PM.

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

About Us

"It's about Microsoft Excel"