pointers to control properies

  • Thread starter Thread starter thread
  • Start date Start date
T

thread

Hi all,

I need to build a form that its controls are changing dynamicly during
the run time
i would like to know if there is a way to control these controls with a
pointer and in that way it will be enough to change one pointer value
in order to change several control's properties value in the same time

any examples for me?
 
Once you have the form open, you can loop through the Controls collection of
the form, and examining or setting the properties of each like this:

Dim ctl As Control
For Each ctl In Me.Controls
Debug.Print ctl.Name, ctl.ControlType, ctl.Properties.Count
ctl.Visible = True
Next

Once you have a reference to the control, you can use the With construct:
With ctl
.Width = 1440
.Enabled = True
End With
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top