Results 1 to 3 of 3

Thread: How to select all objects into a form?

  1. #1
    Cris
    Guest

    How to select all objects into a form?

    Hi,

    Say I have a form or a picture which is placed on a form. The container, that is, either the form or the picture contains a set of objects as commandbutton for example. I want to select all when I do click on the "select all" item menu.

    Can you help me?

    Bye,

    Cris

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    You would say something like:

    Dim My Control As Control

    For Each MyControl In Form1.Controls
    If TypeOf MyControl Is CommandButton Then
    'Do something
    End If
    Next MyControl

  3. #3
    New Member
    Join Date
    May 2001
    Location
    Calle
    Posts
    9
    please spezify your question


    what do you want to do with the object´s

    i.e
    do you want all commandbuttons to disable

    dim blub as object

    for each blub in form.controls

    'disable
    if Typeof blub is CommandButton then blub.enabled=false

    'unvisible
    if Typeof blub is CommandButton then blub.visible=false

    next

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