I think this is what you mean
visSlats = Range("Vis").Value
visSlats = visSlats + 1
For v = visSlats To 100
Construct.Controls("Slat" & v).Visible = False
Next v
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
"pspyve" wrote in
message ...
Hi Guys,
Problem: I have 100 buttons on a userform named
Construct.Slat1
Construct.Slat2
Construct.Slat3
etc etc
I need to make some of them invisible i.e
from visSlats to 100
Here is my code.
visSlats = Range("Vis").Value
visSlats = visSlats + 1
For v = visSlats To 100
Construct.Slat(v).Visible = False
Next v
(This dosent work)
Where Construct is the userform name
What do I need to do to make this work??
Phil
--
pspyve
------------------------------------------------------------------------
pspyve's Profile:
http://www.excelforum.com/member.php...o&userid=30656
View this thread: http://www.excelforum.com/showthread...hreadid=571292