Reputation: 415
sorry for a noob question but don't want to repeat this "MainFrm1.UcSettings" thing everytime..
MainFrm1.UcSettings.IDtxt.text = 0112
MainFrm1.UcSettings.Nametxt.text = "Chuck Norris"
and so on...
what i want it to do is to set a string like this..
Dim str as string = "MainFrm1.UcSettings"
dim obj as object = str
obj.IDtxt.text = 0112
obj.Nametxt.text = "Chuck Norris"
and so on...
but what i've done is wrong..lol how to do this in correct way ? tnx in advance..
Upvotes: 0
Views: 38
Reputation: 6030
I'm expecting your UcSettings to be a custom user control. Then you can use it is a type:
Dim uc as UcSettings = MainFrm1.UcSettings
uc.IDtxt.text = 0112
uc.Nametxt.text = "Chuck Norris"
Upvotes: 1