public function stringlen(Byval ostring) as string dim strArray() as Byte dim MyEncoder as System.Text.Encoding=System.Text.Encoding.Default strArray=MyEncoder.GetBytes(ostring) strlen=strArray.length return strlen end function