add handler

01-10-2005, 02:51 PM
i created some arreys of textboxes you can email any time (
i created an textchaged method for one of them but i dont know how to name that method that i will be able to add more methods from the same group beacuse i created a method that the user will not be able to insert any
data if its not a number
very nice method .

here is one sample of what i did

AddHandler numofcbl(i).TextChanged, New EventHandler(AddressOf textchaged)

Private Sub textchaged(ByVal sender As Object, ByVal e As EventArgs)
For i = 0 To newnumber
If numofcbl(i).Text <> "" Then
len = numofcbl(i).Text.Length
checknum = Asc(numofcbl(i).Text.Substring(len - 1, 1))
If checknum < Asc(0) Or checknum > Asc(9) Then
MsgBox("only numbers please")
numofcbl(i).Text = ""
End If
End If
End Sub

thank you

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum