Results 1 to 4 of 4

Thread: looping combobox IN FRAME VB6 and retirn combobox name

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Mar 2005
    Posts
    2,580

    looping combobox IN FRAME VB6 and retirn combobox name

    my test code:

    ...
    Dim cCont As Control, name as string

    For Each cCont In Me.Controls.Frame1
    If TypeName(cCont) = "COMBOBOX" Then
    name=?????
    End If
    Next cCont
    ...

    i need only for frame1, in form have also frame2.

  2. #2
    PowerPoster jdc2000's Avatar
    Join Date
    Oct 2001
    Location
    Idaho Falls, Idaho USA
    Posts
    2,393

  3. #3
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    Re: looping combobox IN FRAME VB6 and retirn combobox name

    Your object in this case is cCont so if you want the name of it you would try cCont.Name

  4. #4
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,145

    Re: looping combobox IN FRAME VB6 and retirn combobox name

    like this:

    Code:
        Dim cCont As Control
        For Each cCont In Me.Controls
           If cCont.Container Is Frame1 Then
              Debug.Print cCont.name
           End If
        Next cCont
    Sam I am (as well as Confused at times).

Posting Permissions

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



Click Here to Expand Forum to Full Width