Hi,
if you caption text is longer than width of Button, then will be split to two lines automatically without any newline symbol (e.g. vbNewLine, or other).
But, if you would like to search exact phrase vbNewLine in caption text, syntax is:
Dim position As Long
position = InStr(1, Button.Caption, vbNewLine, vbBinaryCompare)
If position > 0 Then
'there is more lines in text
End If
Peko
|