View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
LoveCandle[_35_] LoveCandle[_35_] is offline
external usenet poster
 
Posts: 1
Default Summerizing 35 codes in one


Hi everybody,

I have the following code which is implemented on 35 comboboxes in on
sheet .. I wrote the same code 35 times .. only changing the comboxbo
number.

Can I implement the same code on 35 comboboxes without repeating it 3
times?


Code
-------------------
Private Sub ComboBox1_Change()
On Error GoTo X
ComboBox1 = Application.WorksheetFunction.Match(ComboBox1, [D2:D6], 0)
Exit Sub
X:
If Err = 1004 Then
Me.Activate
Else
Resume
End If
End Su
-------------------


I hope that my question is clear for all,

Thank you

--
LoveCandl
-----------------------------------------------------------------------
LoveCandle's Profile: http://www.excelforum.com/member.php...fo&userid=2861
View this thread: http://www.excelforum.com/showthread.php?threadid=56420