• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 233
  • 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
 
Jorge PaulinoIT Pro/DeveloperCommented:
Change to:
Me.Controls("Panel" & CStr(intPanel)).visible = False

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

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