Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default Defining a Property

How would I define a collection as a property of a class?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default Defining a Property

You have me a little lost here. A collection is not really a property but
more of a container for objects. So what do you mean by a perperty. Do you
mean the prperties of the objects within the collection? You can make the
collection accessible as a part fo teh class by just declaring it public kind
of like this

CLASS
Option Explicit

Public col As Collection

Private Sub Class_Initialize()
Set col = New Collection
End Sub

MODULE
Sub test()
Dim var As Class1

Set var = New Class1

var.col.Add Sheet1, Sheet1.Name
End Sub
--
HTH...

Jim Thomlinson


"Cody" wrote:

How would I define a collection as a property of a class?

Reply
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
Runtime Error 380 – Could not set the list property. Invalid property value BernzG[_16_] Excel Programming 2 August 21st 05 10:10 PM
Defining Matt Excel Discussion (Misc queries) 1 July 26th 05 08:13 PM
Value Property vs Text property augustus Excel Programming 3 October 31st 04 10:32 PM
Runtime error 380: Could not set the List property. invalid property value of listbox jasgrand Excel Programming 0 October 6th 04 09:28 PM
Is there a Filename property in PrintOut property Christian[_6_] Excel Programming 4 September 3rd 04 10:12 PM


All times are GMT +1. The time now is 12:01 PM.

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"