Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
class module programming?
I'm about to revamp a program I wrote to take advantage of making up a class
(or several) to better organize the data and controls in my userform. I understand the basic idea of classes (person class has name, phone, address, birthday, etc.) but I need to learn more about two things, so if anyone can point me to resources that have good explanations and snippets I can play with, I'd appreciate it; (1) "Meta classes", e.g., groups of classes. For example, instead of having a bunch of different instances of my person class and having to sort through all of them to see which ones work in Finance, I'd like to make some sort of 'finance group' and assign all the instances of the finance people to that meta-class. Hopefully to loop through that meta-class when I need to pull data from all of those instances. (2) How to best call my meta-classes from a treeview? I'm going to replace a series of interdependent optionbutton groups with a treeview on my userform(office97); is there a preferred method of linking a treeview selection (including which event(s) and possible problems) to drive which metaclass I pull data from for the rest of my userform? Many, many thanks, Keith -- The enclosed questions or comments are entirely mine and don't represent the thoughts, views, or policy of my employer. Any errors or omissions are my own. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
class module programming?
Keith,
For #1, you can create a class that holds a collection of "Persons", one for each "Department". You can also have a class that holds a collection of collections, "Organisation", so all your departments are contained. As for #2 From the "Organisation", you then add a node for each "Department" collection, then do the same within each Department, adding nodes for each "Person". Depending how many nodes you expect and how they will be filled (over a network ?), you do not have to fill the whole treeview initially, as most are not immediately visible. You can fill nodes as required, from a suitable event. NickHK "KR" wrote in message ... I'm about to revamp a program I wrote to take advantage of making up a class (or several) to better organize the data and controls in my userform. I understand the basic idea of classes (person class has name, phone, address, birthday, etc.) but I need to learn more about two things, so if anyone can point me to resources that have good explanations and snippets I can play with, I'd appreciate it; (1) "Meta classes", e.g., groups of classes. For example, instead of having a bunch of different instances of my person class and having to sort through all of them to see which ones work in Finance, I'd like to make some sort of 'finance group' and assign all the instances of the finance people to that meta-class. Hopefully to loop through that meta-class when I need to pull data from all of those instances. (2) How to best call my meta-classes from a treeview? I'm going to replace a series of interdependent optionbutton groups with a treeview on my userform(office97); is there a preferred method of linking a treeview selection (including which event(s) and possible problems) to drive which metaclass I pull data from for the rest of my userform? Many, many thanks, Keith -- The enclosed questions or comments are entirely mine and don't represent the thoughts, views, or policy of my employer. Any errors or omissions are my own. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
CLASS MODULE & SIMPLE MODULE | Excel Discussion (Misc queries) | |||
class module? | Excel Programming | |||
Class module in VBA | Excel Programming | |||
Variable from a sheet module in a class module in XL XP | Excel Programming |