Thread: Module Access
View Single Post
Old Apr 5th, 2005, 3:56 PM   #8
Rory
Expert Programmer
 
Rory's Avatar
 
Join Date: Jan 2005
Location: London
Posts: 542
Rep Power: 4 Rory is on a distinguished road
Send a message via MSN to Rory
Then you need Form1.[name of control].MyLabel.Caption = "hello"
What VB is trying to do is reference the class rather than the instance on a form, which can't be done.
Let's say I had a usercontrol called ctlMyWidget. The default name for the control when I put it on a form would be ctlMyWidget1. As you're using UserControl1 for the class name, the default name is actually UserControl11 , which is where the problem is.
Rory is offline   Reply With Quote