Issue 125441

Summary: validity options enhancement : formula,Text only
Product: Calc Reporter: papayes <jyl44>
Component: programmingAssignee: AOO issues mailing list <issues>
Status: UNCONFIRMED --- QA Contact:
Severity: Minor    
Priority: P3    
Version: 4.2.0-dev   
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
Excel Option Personnalisé none

Description papayes 2014-08-15 06:54:08 UTC
Created attachment 83839 [details]
Excel Option Personnalisé

Hello
Calc: menu: data > Validity >
1 Excel 2013 offers a "Custom" option which calls for a formula. (see attachment). Perhaps an enhancement for Calc?
2. But still not a "Text Only".
Can we expect this option to replace this Bernard Marcelly macro?
"Option Explicit

Function verif(v) As Boolean
Dim texteSeul As Boolean
Dim n As Long

texteSeul = True
if IsNumeric(v) then
  texteSeul = False ' le texte est un nombre
else
  for n = Asc("0") to Asc("9")
    if InStr(1, v, chr(n), 0) > 0  then
      texteSeul = False ' au moins un chiffre dans le texte
    end if
  next
end if

if not texteSeul  then
  MsgBox("Les chiffres sont interdits", 16, "Erreur de frappe")
end if
verif = texteSeul
End Function"
Comment 1 papayes 2014-08-15 07:27:07 UTC
Hello,
Can be seen as a complement to the old issue :
https://issues.apache.org/ooo/show_bug.cgi?id=26928

A+