Results 1 to 3 of 3

Thread: Enumerating Controls Properties

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2001
    Location
    Perth, Australia
    Posts
    4

    Unhappy

    I need to extract the properties available on any given control at run-time. How?????

    This sure as hell doesn't work!

    Dim ctr As Control
    Dim prp As Property
    Set ctr = Me.cmdAppraise


    For Each prp In ctr.Properties
    Debug.print prp.Name
    Next

    Someone, a little help, anyone, some help please :-(
    If it's not broken then break it and build a better one!

  2. #2
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    Code:
    Dim ctl As Control
    For each ctl In controls
        if typeof ctl is textbox then
            ctl.text = "Testing"
        end if
    Next ctl
    or
    Code:
    Dim ctl as Control
    for each ctl in controls
        debug.print ctl.Name
    Next ctl

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2001
    Location
    Perth, Australia
    Posts
    4

    Red face

    Thanks but I need something a little different.

    The code needs to list all properties for a given control, name and value.

    Much like the properties pane in the VB development screen.
    If it's not broken then break it and build a better one!

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