Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42384

Changes to all textboxes in a form

$
0
0
Hiya...I've came to another problem. Why the code bellow is not working properly although all my textboxes names starting with tb_name, tb_adress, etc...
Code:

      For Each GB As Control In Me.Controls
            If TypeOf GB Is GroupBox Then
                For Each ctl As Control In Me.Controls
                    If TypeOf ctl Is TextBox Then
                        If ctl.Name.StartsWith("tb") Then
                            MsgBox("Test")
                        End If
                    End If
                Next
            End If
        Next

I cant see any problem or?

Viewing all articles
Browse latest Browse all 42384

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>