LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default Calling Classes from Classes

I have several Class modules set up, each representing a larger scope than
the next, so they tier into each other. I was trying to get a string and
couldn't get it to work. The Line I tried was:

sElement = WBSStructure.WorkProduct(inx).Element(iny).Name

Below is a simplified version of the element class, and the workproduct is
similar. I noticed in order to get that nice Illisense I needed to have the
function return cElement, but that is causing an error when i try to retunr
anything other than the class object. Any help would be appreciated, as
Chip's taught me enough to get myself in trouble (No offense Chip :P)

Private pNameWP As String
Private pElementsWP As New Collection

Property Let Name(S As String)
pNameWP = S
End Property

Property Get Name() As String
Name = pNameWP
End Property

Public Function Element(index As Integer) As cElement

If index pElementsWP.Count Or index < 1 Then
Err.Raise 9
Else
Element = pElementsWP(index)
End If

End Function
--
*********************
J Streger
MS Office Master 2000 ed.
MS Project White Belt 2003

 
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
Constructors for Classes Gary F Excel Programming 3 September 8th 06 05:56 PM
Classes containing Classes Adam[_15_] Excel Programming 2 April 1st 06 07:47 AM
Counting Classes MillerK Excel Discussion (Misc queries) 0 March 10th 06 03:32 PM
Using Classes in .xla oli Excel Programming 2 June 3rd 05 11:37 AM
calling from one workbook the classes and functions in another mark Excel Programming 5 April 22nd 04 12:06 AM


All times are GMT +1. The time now is 06:45 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"