Hi thanks for the response. It is a control that I created.
I tried the following but get a runtime error (Object reference is not set
to an instance of an object) when using
Imports projectname.usercontrolname '
Me.usercontrolname.Visible = False ' runtime error occures here.
I also set up the code below like what you had suggested which seems to run
ok but not sure if it is itterating through all of the controls on the form.
For Each ctrl As Control In Me.Controls
ctrl.Visible = True
Next
"Steve C. Orr [MVP, MCSD]" wrote:
> So this is a user control you've created?
> If so, you probably need to implement your own version of the visible
> property and put code similar to this in it:
>
> For each ctrl as Control in Me.Controls
> ctrl.Visible=Value
> Next
>
> Here's more info:
> http://SteveOrr.net/faq/ControlTreeRecursion.aspx
>
> --
> I hope this helps,
> Steve C. Orr, MCSD, MVP
> http://SteveOrr.net
>
>
> "Paul" <(E-Mail Removed)> wrote in message
> news:4BAA779C-5CF0-4795-A90C-(E-Mail Removed)...
> > Hi I am trying to conditionally hide a user control on a form in the code.
> > There is a visible element in the properties box of the user control but
> > in
> > the .vb file (in the code) the object does not seem available. Using me.
> > the
> > intellsince does not show the user control name, so can not seem to get to
> > its properties in code.
> > Thanks.
> > Paul G
> > Software engineer.
>
>
>