View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Scott Scott is offline
external usenet poster
 
Posts: 30
Default Passing Values From Command Buttons

Dear All

Thanks for your input. I still can't get it to work. What do I need to do to the code below to fix it (i.e. pass the variable)? Here is my procedure
------------------------------
Sub ColorCell(

Range("D4").Selec

Select Case Numbe
Case
With Selection.Interio
.ColorIndex = 6 'Yello
.Pattern = xlSoli
End Wit

Case
With Selection.Interio
.ColorIndex = 10 'Gree
.Pattern = xlSoli
End Wit

Case
With Selection.Interio
.ColorIndex = 5 'Blu
.Pattern = xlSoli
End Wit

Case
With Selection.Interio
.ColorIndex = 3 'Re
.Pattern = xlSoli
End Wit

End Selec

End Su
---------------------------------------
Here is my Click Event

Sub CommandButton1_Click(
ColorCel
End Su