Thread: Class confusion
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tony Rizzo[_2_] Tony Rizzo[_2_] is offline
external usenet poster
 
Posts: 6
Default Class confusion

I'm working on a VBA application for creating project plans. I have a
working prototype that uses msoRectangles in which the user can type
descriptions of tasks and task-inputs. But now I need to associate data
other than a simple text string, with each task. So I'm thinking of a new
class. Silly me!

I've read all that I could find and understand about new class modules.
Specifically, I've digested Walkenbach's chapter 29, "Excel 2002 Power
Programming with VBA." But I'm still far from my objective.

I'm not looking for a detailed lesson on how to create new class modules and
all the rest of OOP, because I don't expect anyone here to do my work for
me. But, frankly, I'm so far off the mark that I don't even know where to
find the information that I need. I don't even know if I'm asking the right
questions. So I'm looking for a little guideance from this group. Here's a
sample of what I think I know and what I think I need to know. If anyone
here can direct me to a book that I can understand (I'm really very new to
OOP), I'd be most grateful.

1) How do I create a new class that builds on existing msoRectangles and the
like?

2) If each instance of a new class is destroyed when the procedure that
creates it ends, how do I store the data for the object, so that it's there
when the workbook is opened at a late date? (I'm not even sure that this
question will make much sense to folks here.)

3) How do I define a new class, so that when the user changes the text in an
msoShape, the corresponding object in my new class also gets updated?

Finally, and this is what I really hope that somebody can help me with,
where can I read _understandable_ explanations of all this OOP stuff, with
code examples that illustrate the use of existing msoShapes as the basis for
new class definitions?

Tony Rizzo