Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Yes it can be done, if anyone else has the same problem: this code in class module Public WithEvents ComboGroup As ComboBox Private Sub ComboGroup_KeyDown(ByVal KeyCode As MSForms.ReturnInteger ByVal Shift As Integer) If KeyCode = 13 Then carry out sub call end if end sub ******** init each combo box with class module in code module as follows: Dim Buttons() As New Class1 Sub init() Dim ctl As OLEObject Dim WS As Worksheet Dim ButtonCount As Integer 'Loop through each comboBox on each sheet For Each WS In Worksheets For Each ctl In WS.OLEObjects If TypeOf ctl.Object Is ComboBox Then ButtonCount = ButtonCount + 1 ReDim Preserve Buttons(1 To ButtonCount) Set Buttons(ButtonCount).ComboGroup = ctl.Object End If Next ctl Next WS End Sub Just in case anyone else has the same proble -- cmpcwil ----------------------------------------------------------------------- cmpcwil2's Profile: http://www.excelforum.com/member.php...fo&userid=3341 View this thread: http://www.excelforum.com/showthread.php?threadid=54939 |