ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA- Contains any element (https://www.excelbanter.com/excel-programming/325194-vba-contains-any-element.html)

digiphotogirl

VBA- Contains any element
 
Is there any way I can search a string to see if it contains any element of
another string (or array)? If so, can you give me an example so I can get
the syntax right.

I am trying to force entry of more than 5 characters, at least one of which
is from the 26-character alphabet, into a form text box.

Thanks.

Bob Phillips[_6_]

VBA- Contains any element
 
Look at the InStr function in VBA help.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"digiphotogirl" wrote in message
...
Is there any way I can search a string to see if it contains any element

of
another string (or array)? If so, can you give me an example so I can

get
the syntax right.

I am trying to force entry of more than 5 characters, at least one of

which
is from the 26-character alphabet, into a form text box.

Thanks.





All times are GMT +1. The time now is 03:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com