adding an integer to a string in code

P

pspyve

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

Phi
 
B

Bob Phillips

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top