LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Can this be done?


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



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"