I made a sub to hide a selection of labels and display a new section, but I don't know how to include a variable into a function like lblCon.Visible. Here's what I mean, examine my current code:
Now what I want to do is something like "lblCon(HideObject1).Visible = False" so say, I call the function like this:Code:Public Sub DisplayNext(ByVal HideObject1 As Integer, ByVal HideObject2 As Integer, ByVal HideObject3 As Integer, ByVal HideObject4 As Integer, ByVal HideObject5 As Integer, ByVal HideObject6 As Integer) lblCon1.Visible = False lblCon2.Visible End Sub
"DisplayNext(1,2,3)" so the function would do this: "lblCon1.Visible = False lblCon2.Visible = False lblCon3.Visible = False"
how would I do that? I think the main question is, how do I include a variable in a function like that? lblCon#.Parameter




Reply With Quote