View Single Post
Old 05-05-2004, 10:20 AM   #2 (permalink)
Stompy
Banned from being Banned
 
Location: Donkey
Assuming all your textboxes are prefixed with "txt", you could try something like:

Code:
    Dim e As Control
    
    For Each e In Me.Controls
        If (TypeOf e Is TextBox) Then
            MsgBox e.Name + " = " + e.Text
        End If
    Next
I haven't used VB in a while, so I don't remember if there's a way to check the type of a control... like "if e is TextBox" (which you can do in .net)

[edit]

NM, Just remembered it. Code above edited for TypeOf
__________________
I love lamp.

Last edited by Stompy; 05-05-2004 at 10:24 AM..
Stompy is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76