ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Class Module query (https://www.excelbanter.com/excel-programming/288866-class-module-query.html)

Darren Hill[_2_]

Class Module query
 
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



Vasant Nanavati

Class Module query
 
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.

--

Vasant

"Darren Hill" wrote in message
...
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





Darren Hill[_2_]

Class Module query
 
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?
--
Darren
"Vasant Nanavati" <vasantn *AT* aol *DOT* com wrote in message
...
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.

--

Vasant

"Darren Hill" wrote in message
...
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








All times are GMT +1. The time now is 09:58 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com