Class Module query

  • Thread starter Thread starter Darren Hill
  • Start date Start date
D

Darren Hill

I have a number of comboboxes grouped via a class module. At the end of the
class module, I want to subdivide the ctrls into sets using a select case
based on the ctrl.name.
But when I attach code to these buttons, it fails.

My query: is there a problem with this approach (having macros triggered by
just a subset of the collection)?
I think the problem could be hidden in my code, but I just want to eliminate
the above possibility.

Darren
 
I don't think you can make subclasses from a class, but I'm not an expert on
class modules. Perhaps if you post your code, you may get more meaningful
help.
 
I would post the code, but there's too much of it. I can't expect the group
to go through it all, so I'm hoping to just check if the methodology I'm
using is flawed. Can you tell me if there's anything wrong with the basic
process described below:

I have a class of comboboxes. When one of these comboboxes is triggered, the
ComboBoxGroup_Change is triggered, and some standard operations are carried
out as you'd expect. Then, at the end of this event code I have

Select Case ComboboxGroup.name
Case "cmbName"
[a macro call here]
Case "cmbType"
[another macro call here]
Case "cmbSet"
[yet another macro call here]
End Select

Now, the macros that are called there work when I call them by other
routines, but when in the class module, they don't. I can think of two
possibilities
a) There's something inherent with class modules that means the above will
never work. (Or some other technique should be used)
b) There's a problem in the macros being called, and I am misidentifying the
class module as the source of my problem?

Any ideas which is more likely?
 
Back
Top