The DuplicatePresent property determines whether a color is repeated in a color palette. If the value returned is True, there are any duplicate colors in the palette.
Examples:
The following VBA example displays a message if there are any duplicate colors in the default palette.
Sub Test()
If ActivePalette.DuplicatePresent Then
MsgBox "Default palette contains duplicate colors"
End If
End Sub