Hi !
I'm kind of new into programming and I would need your help on this one... I have lot of buttons and they are all named by the same prefix "BtnRAP1P_" and a number instead of the underscore. If the value in the range ("L" & ___ ) (the underscore is the row value indicated by the position of the button) is "FAUX" then the button is not visible. I would like to introduce an Array to set the number to loop... and with what I have it crashes...
Sub RAPPORT1()
Dim WS As Worksheet
Dim Para As Variant
Dim i as Integer
Dim a as Integer
Set WS = ActiveSheet
Para = Array(2,3,4,5,6,11,12)
For i = LBound(Para) To UBound(Para)
a = WS.Shapes("BtnRAP1P" & i).Visible = IIF(WS.Range("L" & a).Value = FAUX, True, False)
Next i
End sub
Thanks a lot !
Bookmarks