Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / March 2006

Tip: Looking for answers? Try searching our database.

Class Modules

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MattShoreson - 21 Mar 2006 11:02 GMT
Hi,

I've created a class module containing methods and properties.
Everything works fine.

However....

When I expose the methods and properties after instantiating the class
they are shown as one big list in intellisense.

i.e.  clsReturnExcelADO.CompilePath

How can I change alter this to produce a more tree like behaviour?

i.e.  clsReturnExcelADO.Path.compil
MattShoreson - 21 Mar 2006 13:05 GMT
Is what I'm trying to do above inheritance
MattShoreson - 21 Mar 2006 14:33 GMT
anyone? Tom? any ideas
Chip Pearson - 21 Mar 2006 14:58 GMT
Matt,

Create a new class module named CPath and insert the following
code:

Public Function Compile()
   Debug.Print "Compile"
End Function

Then in your CReturnExcelADO class, put the following code:

Public Path As CPath

Private Sub Class_Initialize()
   Set Path = New CPath
End Sub

Now you can call the comile method as

Dim clsReturnExcelADO As CReturnADO
Set clsReturnExcelADO = New CReturnADO
clsReturnExcelADO.Path.compile

Strucutring you code this way is a very simple object model.

Signature

Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"MattShoreson"

>
> Hi,
[quoted text clipped - 14 lines]
>
> i.e.  clsReturnExcelADO.Path.compile
MattShoreson - 21 Mar 2006 16:43 GMT
Thanks Chip.

Do you know of any resource/book which explains this in more detail
specifically make methods and properties accessible to parent classe
etc.

thx matt
John - 22 Mar 2006 11:34 GMT
Matt,

Take a look at Chip's "Class Module" page on his site:

http://www.cpearson.com/excel/ClassModules.htm

Best regards

John

> Thanks Chip.
>
[quoted text clipped - 3 lines]
>
> thx matt.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.