I’m using VB 2010 Express and have a label named “lblTitle” in my form.
The next code doesn’t work and I know it , but how can I do something like this?
Dim bla As String
bla = "lblTitle"
bla.Text = "Hello world"
Edit: I want to access a label properties without actually having its name.
I get its name from a text file.
Edit 2: Thanks you all guys!
After googling this function you’ve mentioned I got it:
Dim bla = "lblName"
Me.Controls(bla).Text = "Dan"
While “lblName” is a label’s name in the form.
After a deep google search , the answer seems to be easy as that:
while
lblNameis the label’s name in the form.Thanks guys