Dave Punky
Board Regular
- Joined
- Jan 7, 2010
- Messages
- 133
Hi all,
I'm sure this is relatively simple but I'm having a few issues wrapping my head around it.
Basically I have a sub which I want to control several labels - the labels all share the same naming convention, for the most part it's just a number that changes. Basically I want my sub to take the number and determine the object (in this case a label) to manipulate.
So for example, I have 3 labels (named lbl_name1a, lbl_name2a and lbl_name3a) and I want my sub to basically control the label, however it needs to know what label to control.
Essentially I want to control the label by defining it by saying it's ("lbl_name" & number & "a") but I am failing somewhat in making this work - whether it be because I'm defining it incorrectly or I'm just missing something obvious. The plan is I'll control it using another variable defined as msforms.label but it's just telling it what form to control to begin with causing the problem.
Hopefully somebody out there knows where I'm going wrong!
I'm sure this is relatively simple but I'm having a few issues wrapping my head around it.
Basically I have a sub which I want to control several labels - the labels all share the same naming convention, for the most part it's just a number that changes. Basically I want my sub to take the number and determine the object (in this case a label) to manipulate.
So for example, I have 3 labels (named lbl_name1a, lbl_name2a and lbl_name3a) and I want my sub to basically control the label, however it needs to know what label to control.
Essentially I want to control the label by defining it by saying it's ("lbl_name" & number & "a") but I am failing somewhat in making this work - whether it be because I'm defining it incorrectly or I'm just missing something obvious. The plan is I'll control it using another variable defined as msforms.label but it's just telling it what form to control to begin with causing the problem.
Hopefully somebody out there knows where I'm going wrong!