While the text is selected -- which means while the text box has the
focus -- the control's .SelStart and .SelLength properties tell where
the selection begins and how long it is, so you can use them to extract
the selected substring from the .Text property:
If .SelLength > 0 Then
strSelected = Mid$(.Text, .SelStart + 1, .SelLength)
strSelected = vbNullString
However, when the control loses the focus, the selection will be lost.
So if you want to have this information available in some other event,
you may need to capture it in the control's Exit event, before the focus
is lost, and store it in a module-level variable.
Dirk Goldgar, MS Access MVP
(please reply to the newsgroup)