Reputation: 11
Here's my problem :
"p1".FillColor = Color.Gray
The goal is :
p1.FillColor = Color.Gray
Upvotes: 0
Views: 134
Reputation: 175748
You cannot magically convert the string literal "p1"
in to the identifier p1
, instead use the string name to locate the control:
VB6: Me.Controls("p1").FillColor = whatever
VB.Net:
CType(Me.Controls.Find("p1", True)(0), XXX).FillColor = Color.Gray
where XXX
is the type name of the control
Upvotes: 1