Button Control Class Not working

Lenny_821

New member
Local time
Today, 12:55
Joined
Sep 14, 2005
Messages
9
Hi All,

How can I get this to work? I've got about 15 Comboboxes which has to do a particular macro. Here's the VBA;

Public Sub Form_Open(Cancel As Integer)

ButtonCount = 0
For Each ctl In Me.Controls
If TypeName(ctl) = "Combobox" Then
ButtonCount = ButtonCount + 1
ReDim Preserve Buttons1(1 To ButtonCount)
Set Buttons(ButtonCount).LabelGroup = ctl
End If
Next ctl

End Sub

_________________________________________________________

Public WithEvents LabelGroup As Access.ComboBox
Public Sub LabelGroup_AfterUpdate()

If Left(LabelGroup.Name, 2) = "cb" Then
ComboBoxesAfterUpdate 'this is a reference to a macro
End If

End Sub

Please help:):)

Lenny
 

Users who are viewing this thread

Back
Top Bottom