## creating an item with a variabble ##

rudders

New Member
Joined
Oct 13, 2005
Messages
23
guys, hi

is it possible to use a variable within an item when changing its properties..

i.e

if i had three option boxes opt1, opt2 and opt3, could i do the following..

number = inputbox "number"

opt &number& .enable = false


i cant seem to do this, but if you can help me with alternative ways, that'd be grand

cheers
 

Some videos you may like

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,062
Office Version
  1. 365
Platform
  1. Windows
Take a look at the Controls collection.
Code:
 For Each c In Me.Controls
        If TypeName(c) = "OptionButton" Then
            c.Enabled = Not c.Enabled
        End If
Next c
 

Watch MrExcel Video

Forum statistics

Threads
1,118,909
Messages
5,574,985
Members
412,630
Latest member
Eireangel
Top