Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
JR_06062005
 
Posts: n/a
Default cell validation even for values pasted into cells

The cell validation feature works fine when a user types a value into a cell,
but does not prevent pasting in a value that does not meet the validation
criteria. Is there a way to validate values that are pasted into a cell?
  #2   Report Post  
Tom Ogilvy
 
Posts: n/a
Default

I think you can prevent pasting by locking the cell and protecting the
sheet, but I don't believe you can validate a pasted value unless you use
VBA code to react to the action.

--
Regards,
Tom Ogilvy

"JR_06062005" wrote in message
...
The cell validation feature works fine when a user types a value into a

cell,
but does not prevent pasting in a value that does not meet the validation
criteria. Is there a way to validate values that are pasted into a cell?



  #3   Report Post  
JR_06062005
 
Posts: n/a
Default

Can I get some help with the VB code on this board or do I need to go to the
Excel programming board?

I know code that will test for a given value to a cell, but I don't know
how to test for pasted values even in VB.

I'm guessing that the code would go in either the worksheet sub-procedure
Worksheet_SelectionChange(ByVal Target As Range) or Private Sub
Worksheet_Change(ByVal Target As Range) and I would also guess that
Cells(col,row).value property might be used. But I have no idea how to
determine if a value is pasted or typed into a cell, or how to test pasted
values against a list of values as opposed a single value, a procedure which
is easy to do with typed values using the data validate routine.

End Sub


"Tom Ogilvy" wrote:

I think you can prevent pasting by locking the cell and protecting the
sheet, but I don't believe you can validate a pasted value unless you use
VBA code to react to the action.

--
Regards,
Tom Ogilvy

"JR_06062005" wrote in message
...
The cell validation feature works fine when a user types a value into a

cell,
but does not prevent pasting in a value that does not meet the validation
criteria. Is there a way to validate values that are pasted into a cell?




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
How do I view cell text without it visually hiding other cells? ldmci Excel Discussion (Misc queries) 1 May 27th 05 04:12 PM
Copy cell format to cell on another worksht and update automatical kevinm Excel Worksheet Functions 21 May 19th 05 11:07 AM
Format Validation Cells John B Excel Discussion (Misc queries) 1 March 16th 05 01:21 PM
Need to find the right-most cell value in a string of cells -dc- Excel Worksheet Functions 2 March 8th 05 07:28 PM
Help adding text values Texas-DC_271 Excel Worksheet Functions 7 January 15th 05 11:14 PM


All times are GMT +1. The time now is 06:03 AM.

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"