LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Class Hierarchy in VBA

I did read up! I got that idea off a microsoft page on this website.
And if anyone else is reading this then I forgot the "set" command in my
code. It should have been:

private sub Class_Initialize
set super = new ClassA
end sub


"NickHK" wrote:

I think you need to read up on how Implements/Interface/classes work.
Chack the help for the Implements key word.

NickHK

"Blue Aardvark" wrote in message
...
Hello

Classes are a real pain in vba. But you could try doing something like

this.
Lets say you want Class B to extend Class A. In the class B code write:

Implements ClassA

private super as ClassA

private sub Class_Initialize
super = new ClassA
end sub

So now classB has an internal copy of ClassA inside it and so you can make
references to that. Eg: super.print( )

(in theory it should work, but as I'm currently stuck on interfaces too

then
I may not be the best person for advice!!)




 
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
Hierarchy table Derrick Excel Discussion (Misc queries) 1 October 31st 08 01:53 AM
Class modules: parametrize class object fields Jean-Pierre Bidon Excel Programming 11 August 31st 06 02:49 PM
Hierarchy in excel jamshaggy New Users to Excel 1 July 23rd 06 06:49 PM
Sort by Hierarchy SpaceCamel Excel Programming 1 February 26th 06 08:52 AM
Sum in hierarchy hideki[_26_] Excel Programming 3 February 23rd 06 06:24 PM


All times are GMT +1. The time now is 10:28 AM.

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

About Us

"It's about Microsoft Excel"