Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Jun 2002
    Location
    Durham, North Carolina, USA
    Posts
    140
    Thanks
    5
    Thanked 1 Time in 1 Post

    Any way to print (or even see) a list of controls (W97/VBA)

    I've got a UserForm with 8 different option buttons (one group of 2, 2 groups of 3). Is there any way to print (or see) a list of the names of the controls on my UserForm?

    TIA,

    Beej

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Any way to print (or even see) a list of controls (W97/VBA)

    The following routine

    Sub PrintControlNames
    Dim ctl As MSForms.Control
    For Each ctl In UserForm1.Controls
    Debug.Print ctl.Name
    Next ctl
    End Sub

    will "print" a list of control names of the user form named UserForm1 to the Immediate window.

Posting Permissions

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