Thanks Debra and Dave,
next question is that the greying out and disabling is to be applied to a
bunch of textboxes, which involves the code below, which works fine, but for
future reference is it possible or beneficial to wrap this up a little
neater?
i was looking at the with command but it seems this is for applying a
variety of changes to a selection trather than a change to a variety of
selections.
TIA
Rick
Private Sub cef_change()
If cef = True Then
Rsph.Enabled = False
Rsph.BackColor = &H8000000F
Rcyl.Enabled = False
Rcyl.BackColor = &H8000000F
Raxis.Enabled = False
Raxis.BackColor = &H8000000F
Radd.Enabled = False
Radd.BackColor = &H8000000F
Rprism.Enabled = False
Rprism.BackColor = &H8000000F
Rbase.Enabled = False
Rbase.BackColor = &H8000000F
Lsph.Enabled = False
Lsph.BackColor = &H8000000F
Lcyl.Enabled = False
Lcyl.BackColor = &H8000000F
Laxis.Enabled = False
Laxis.BackColor = &H8000000F
Ladd.Enabled = False
Ladd.BackColor = &H8000000F
Lprism.Enabled = False
Lprism.BackColor = &H8000000F
Lbase.Enabled = False
Lbase.BackColor = &H8000000F
Else...................etc.etc
Debra Dalgleish wrote:
|| The following code will disable the textbox, and change the
|| background colour.
||
|| Private Sub cef_change()
|| If cef = True Then
|| Rsph.Enabled = False
|| Rsph.BackColor = &H8000000F
|| Else
|| Rsph.Enabled = True
|| Rsph.BackColor = &HFFFFFF
|| End If
|| End Sub
||
||
|| Rick Sanderson wrote:
||| Private Sub cef_change()
||| If cef = True Then
||| Rsph = False
||| End If
|||
|||
||| If the cef checkbox is selected how does one then grey out a
||| selected texbox, in this case Rsph, as is stands the box displays
||| false
||
||
|| --
|| Debra Dalgleish
|| Excel FAQ, Tips & Book List
||
http://www.contextures.com/tiptech.html