View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mark Worthington Mark Worthington is offline
external usenet poster
 
Posts: 24
Default Prevent duplicate in Data Validation

Further to the recent posts, I have been working on a method to create
Data Validation using sorted, non-duplicated items. This is based on a
John Walkenbach method, ref "Power Programming 2002 VBA", page 423.
Based on a tip by J.G. Hussey, published in "Visual Basic Programmer's
Journal".

Data Validation requires that the List Source must be a delimited list
or a reference to a single row or column.

My methods are to create Data Validation in VBA by using either :

1. a delimited list (VBA string variable, effectively held in memory),
or
2. a worksheet range.

The former is limited to 256 characters, OK for most "normal"
purposes. The latter requires writing to the worksheet as I have been
unable to implement a range "in memory" that works with Data
Validation. I've tried all sorts of naming techniques, no luck. If
anyone has an ideas, it would finish off this approach to removing
duplicates from Data Validation.

If anyone is interested in examples, please ask.

Regards,

Mark