• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 213
  • Last Modified:

Referencing a Control on a WinForm

Why does this simple cmd-line:

    Me("Panel" & CStr(intPanel)).visible = False

throw the following compile error:

 Class '<classname_Root.formname>' cannot be indexed because it has no default property.
0
brian_appliedcpu
Asked:
brian_appliedcpu
1 Solution
 
jpaulinoCommented:
Change to:
Me.Controls("Panel" & CStr(intPanel)).visible = False

Open in new window

0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now