Heya guys
I was wondering is it possible to search a form for all the textboxes that contain a phrase in their name and then add all the values of thoses textboxes together?
Thank youin advance
Frosty
Printable View
Heya guys
I was wondering is it possible to search a form for all the textboxes that contain a phrase in their name and then add all the values of thoses textboxes together?
Thank youin advance
Frosty
try this:
vb Code:
Dim counter As Integer = 0 For Each ctrl As Control In Me.Controls If ctrl.GetType Is GetType(TextBox) AndAlso ctrl.Name.Contains("value") Then counter += CInt(Val(ctrl.Text)) End If Next MsgBox(counter)
what if the textbox required is part of a .Dll customer control