RawlinsCross
Active Member
- Joined
- Sep 9, 2016
- Messages
- 437
Hi, I already use this code for ComboBox controls successful using the following code.
I'm trying to do the same to ToggleButtons using this code which isn't working. What is the correct syntax here?
Code:
Dim i As Long
For i = 6 To 1 Step -1
If Me.Controls("ComboBox" & i).Value = "No" Then
ActiveChart.Legend.LegendEntries(i).Delete
End If
Next i
I'm trying to do the same to ToggleButtons using this code which isn't working. What is the correct syntax here?
Code:
Dim i As Long
For i = 6 To 1 Step -1
If Me.Controls("ToggleButton" & i).Value = False Then
ActiveChart.Legend.LegendEntries(i).Delete
End If
Next i