View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
azSuch azSuch is offline
external usenet poster
 
Posts: 3
Default Avoid multiple select constructs

Hi,
I m a newbie, I have this select case checking for textbox values. I
want to loop this so that it checks for all the textboxes. Or else I
got to write the same code for each Textbox :(

Select Case Me.TextBox1.Value

Case Is < 2
Me.TextBox1.BackColor = &H80FF80

Case 2 To 4
Me.TextBox1.BackColor = &H80FFFF

Case Is 4
Me.TextBox1.BackColor = &HFF
End Select