if LEN(Textbox1.text)>20 then
msgbox "This cell has greater than 20 characters"
else
'whatever goes here
end if
However, you mentioned cells - you may simply use a worksheet formula to test....
=IF(LEN(A1)>20,"A1 has >20 characters","<20 characters")
Rgds, Geoff
We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.
Please read FAQ222-2244 before you ask a question