Results 1 to 9 of 9

Thread: [RESOLVED] Get Control Name

  1. #1

    Thread Starter
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Resolved [RESOLVED] Get Control Name

    Get all controls on a form.
    Last edited by Nightwalker83; Dec 13th, 2007 at 07:46 PM.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  2. #2
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429
    Hey NightWalker, Try:
    VB Code:
    1. Private Sub Command1_Click()
    2.    Dim cntl As Control
    3.    For Each cntl In Controls
    4.       List1.AddItem cntl.Name
    5.    Next
    6. End Sub

  3. #3
    Frenzied Member moinkhan's Avatar
    Join Date
    Jun 2000
    Location
    Karachi, Pakistan
    Posts
    2,011
    VB Code:
    1. For Each Ctl In Me.Controls
    2.    Debug.Print Ctl.Name
    3. Next

  4. #4
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429
    IF you had to use the example in ur post, the sytax is:
    TypeOf Control Is


    Bruce.

  5. #5

    Thread Starter
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344
    Originally posted by Bruce Fox
    Hey NightWalker, Try:
    VB Code:
    1. Private Sub Command1_Click()
    2.    Dim cntl As Control
    3.    For Each cntl In Controls
    4.       List1.AddItem cntl.Name
    5.    Next
    6. End Sub
    The example uses that code
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  6. #6
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429
    Originally posted by Nightwalker83


    The example uses that code
    hehe, No it dosn't.... look closely
    (Hint: If Then........)

  7. #7

    Thread Starter
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344
    Originally posted by Bruce Fox


    hehe, No it dosn't.... look closely
    (Hint: If Then........)
    Yeah but still does the same job and doesn't change the size or speed of the app
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  8. #8
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429
    Oh, hang on... I thought u were posting a problem!

    That is why I sent those examples.. Yes, your code does
    work the way u have it

  9. #9
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429
    Originally posted by Nightwalker83
    Yeah but still does the same job and doesn't change the size or speed of the app

    Speed, Oh yes it does....

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