Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
KR KR is offline
external usenet poster
 
Posts: 121
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
CLASS MODULE & SIMPLE MODULE FARAZ QURESHI Excel Discussion (Misc queries) 1 September 7th 07 09:32 AM
class module? sybmathics Excel Programming 17 February 25th 06 02:29 PM
Class module in VBA romkeys Excel Programming 1 August 19th 04 06:20 PM
Variable from a sheet module in a class module in XL XP hglamy[_2_] Excel Programming 2 October 14th 03 05:48 PM


All times are GMT +1. The time now is 04:36 PM.

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

About Us

"It's about Microsoft Excel"