Playing with tags

rikklaney1

Registered User.
Local time
Today, 08:14
Joined
Nov 20, 2014
Messages
157
So I have a list box and 6 buttons next to it. I'm trying to make the buttons visible or not based on whether there is something in the list in that row. My buttons are named REC1 thru REC6 and are tagged logistics but I can't get this code to work. Any ideas where I'm going wrong?



x = Me.List64.ListCount
For Each ctl In Controls
If ctl.Tag = "logistics" Then
If Right(ctl.Name, 1) <= x Then ctl.Visible = True
End If
Next
 
Try setting the comparison to
Code:
VAL(Right(ctl.Name,1) <= x
 
That did it. Thanks.
 
Can you describe the "business" -what you are trying to accomplish in plain English?
A jpg of your form may also be helpful.

OOOps: I see Minty solved it.
 

Users who are viewing this thread

Back
Top Bottom