Excel data validation

Copper Contributor

Can anyone tell me how to increase the number of characters available in a Data Validation Input Message.  225 characters is too few.

1 Reply

@malwhitemwebcoza 

Translated into English and is from Claus Busch

Influence the text length of the input message?

THIS IS ABOUT THE KNOWN 255-CHARACTER VALIDITY CRITERIA PROBLEM IN EXCEL.

 

Sub ShapeInsert()
Dim shp As Shape
Dim myStr As String

myStr = [A20] & [A21] & [A22]


WithRange("B4")
    If Len(myStr) > 255 Then
          Set shp = ActiveSheet.Shapes.AddShape(Type:=137, _
             Left:=.Left, Top:=.Top, _
                Width:=40, Height:=40)
          shp.Name = "Leg" & .Address(0, 0)
          shp.TextFrame.Characters.Text = myStr
          shp.TextFrame.AutoSize = True
          shp.Left = .Offset(0, 1).Left
          shp.Top = .Offset(1, 0).Top
          shp.Visible = False
    else
       With .Validation
          .Delete
          .Add Type:=xlValidateInputOnly, AlertStyle:=xlValidAlertStop
          .InputMessage = myStr
          .ShowInput = True
       End With
End If
End With
end sub 

 

 

Hope I was able to help you with this info.

 

NikolinoDE

I know I don't know anything (Socrates)