|
|
Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
I have a conceptual understanding of classes (class=person, attributes include phone, address, birthday, etc., create as many instances as are needed) but I've never programmed any classes. It looks like I need to learn quickly, to revise an old project. Any pointers to helpful FAQs and learning materials would be greatly appreciated.
I'd also welcome some general guidance on the following design (to be programmed in Word97);
I currently have several cascading lists of radiobuttons on a userform, where a selection in each frame changes the text of the radiobuttons in the next frame, with the entire cascade being 4 frames of radiobuttons. I want to change the first three to a treeview to allow the ssame selections as from the first 3 frames, then depending on what is selected in the lowest level of the treeview, populate the contents of the radiobuttons in the only remaining frame. I'll actually have several objects in the final frame for each class, but I think the properties for all of them can all be driven off the class I create.
So, is there a preferred property or method I can use from the treeview to determine which /group/ of instances of my class to populate into the frame? I guess what I'm really trying to do is have about 25 groups of instances (2 to 15 instances) of my class and know which group to use depending on what is selected in the treeview. I'm not sure if I should create these groups as an array, or if there is such a thing as a 'meta-class', or if there is a better way to program this.
Example: Treeview selections: New Mexico, Arrowwood Site, Finance radiobuttons show each employee's name (from Finance at that site), with a label with their phone number, etc. If you select a different state, site, or department in the treeview, a different group of people show up.
I appreciate any pointers! Thanks in advance, 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.
|
|
Online resources for this sort of thing are a little meagre, but you'll find some guidance if you trawl the VB sites. VBA classes are identical with VB, except tht VBA does not support procedure attributes, so you can use iUnknown functions nor implement your own For...each structures.
The form functions you describe would be *much* easier in VB than in VBA (forms being the other area in which VB and VBA differ significantly). VB supports control arrays, which means you can (eg) write a single piece of code for the click event of all your radio buttons. (In VBA each control has to have its own code.) Given your description, the time savings alone would easily justify the cost of VB (if you can get it at all).
Don't even think about trying to do this in Word 97. Life is too short.
"KR" <nospam[ at ]nospam.com> wrote in message news:%23c9%23roaqGHA.516[ at ]TK2MSFTNGP05.phx.gbl...
[Quoted Text] >I have a conceptual understanding of classes (class=person, attributes > include phone, address, birthday, etc., create as many instances as are > needed) but I've never programmed any classes. It looks like I need to > learn > quickly, to revise an old project. Any pointers to helpful FAQs and > learning > materials would be greatly appreciated. > > I'd also welcome some general guidance on the following design (to be > programmed in Word97); > > I currently have several cascading lists of radiobuttons on a userform, > where a selection in each frame changes the text of the radiobuttons in > the > next frame, with the entire cascade being 4 frames of radiobuttons. I want > to change the first three to a treeview to allow the ssame selections as > from the first 3 frames, then depending on what is selected in the lowest > level of the treeview, populate the contents of the radiobuttons in the > only > remaining frame. I'll actually have several objects in the final frame for > each class, but I think the properties for all of them can all be driven > off > the class I create. > > So, is there a preferred property or method I can use from the treeview to > determine which /group/ of instances of my class to populate into the > frame? > I guess what I'm really trying to do is have about 25 groups of instances > (2 > to 15 instances) of my class and know which group to use depending on what > is selected in the treeview. I'm not sure if I should create these groups > as > an array, or if there is such a thing as a 'meta-class', or if there is a > better way to program this. > > Example: > Treeview selections: New Mexico, Arrowwood Site, Finance > radiobuttons show each employee's name (from Finance at that site), with a > label with their phone number, etc. > If you select a different state, site, or department in the treeview, a > different group of people show up. > > I appreciate any pointers! > Thanks in advance, > 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. > >
|
|
|