Results 1 to 4 of 4

Loop into TextBoxes in an UserForm

Threaded View

  1. #1
    Forum Contributor pierre08's Avatar
    Join Date
    02-16-2010
    Location
    Paris
    MS-Off Ver
    Excel 2003
    Posts
    166

    Loop into TextBoxes in an UserForm

    Hi guys,
    I have an Userform that contain 10 TextBoxes, is there a way to loop into this textboxes, i tried:
    Dim textb As MSForms.TextBox
    For Each textb In UserForm1
        MsgBox textb.Value
    Next textb
    and this:
    Dim textb As String
    Dim i As Integer
    For i = 1 To 10
            textb = "userform1.textbox" & i & ".value"
           MsgBox textb
    Next i
    Both of the code are not working, is there a way that i can do this.

    Thanks for your help.
    Last edited by pierre08; 06-15-2010 at 09:38 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1