Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21089

VBA: Format textboxes for all Forms

$
0
0
Hi Guys!

I am a very new member and hello to everyone.

I am a rookie in VB but I was an apprantice in Excel VBA.
I used to use a module in one of my projects to format textboxes for all userforms in an excel workbook and the code was looking like:
Code:

Sub TxtBx(i As Integer)
    Dim uf As UserForm
        For Each uf In UserForms
            With uf("TextBox" & i)
                If .Text Like "" Then
                ......................................

Now I am moving my project to an application and I need the same module for formatting. So how to say in Windows Form Application like:
Code:

Module Module1
        Sub TxtBx(i As Integer)
            Dim f As  System.Windows.Forms.Form
            For Each f As System.Windows.Forms           
                With f("TextBox" & i)
                .....................

Thanks a lot from very now!

Viewing all articles
Browse latest Browse all 21089

Trending Articles



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