Class Modules

  • Thread starter Thread starter MattShoreson
  • Start date Start date
M

MattShoreson

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
 
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.


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








"MattShoreson"
in message
news:[email protected]...
 
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
 
Back
Top