Il codice che stai usando è per VB.NET. In VB6 i nomi delle proprietà SelectionStart e SelectionLength sono rispettivamente SelStart e SelLength.