If you know what kind of controls have a SetFocus method, you can use this:
VB Code:
  1. Select Case TypeName(varObjectControlOnFocus)
  2. Case "TextBox", "PictureBox"   'add other types here
  3.   varObjectControlOnFocus.SetFocus
  4. End Select