Hi Guys

Im trying to use the following code to effectively do a edit menu -> Select All.

Code:
Screen.ActiveControl.SelStart = 0
Screen.ActiveControl.SelLength = Len(Screen.ActiveControl.Text)

if i replace screen.activecontrol with an exact textbox name, all is well, but with the code above i get the following message:


object doesn't support this property or method



What can I do to make the 'select all' code generic, to act upon any textbox, other than what I have done?


Thanks in advance.