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
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