Hi All,
I would like to learn how to pass a computed Labelname as an argument
to a VB.Net 2003 subroutine.
Let's say I have 20 Label form controls called lblLine1 through
lblLine20, and I want to Bold each Label with a For loop.
'
' This routine will change a Label font to Bold
'
Private Sub BoldLabel(ByRef LabelName as Object)
LabelName.Font = New System.Drawing.Font("Courier New", 12.0!,
FontStyle.Bold)
End ' Bold Label
'
' This routine will Bold all Lines
'
Private Sub BoldAllLines
Dim Index as Integer
For Index = 1 to 20
Call BoldLabel(lblLine & Index)
Next ' Index
End ' Bold All Lines
I know the above statement "Call BoldLabel(lblLine & Index)" is not
correct but I hope it gives you an idea what I want to accomplish.
Your help will be greatly appreciated.
Thank you in advance for your time.
Village Idiot (newbie)