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: 5
Default Array Properties in a Class

I searched as best I could, but couldn't find anything on the
subject. Hopefully someone out there has an answer or knows where one
is.

I'm writing a wrapper for arrays of strings to make my life down the
road easier (working on a large-ish scale data analysis project with a
_lot_ of string comparison, sorting, adding, and removing). Right
now, the following works:

Public Sub Test()
Dim sArray As New StringArray
sArray.AddItem("A")
sArray.AddItem("B")
sArray.AddItem("C")
For i = 1 to sArray.Count
Debug.Print sArray.Item(i)
Next i
End Sub


I'd like to be able to use sArray(i) instead of sArray.Item(i), but
can't find anything on it. I tried using the NewEnum hack for
Collection wrappers, but VBA doesn't seem to agree with me that it
should work about the same. Any suggestions?

(In case it helps, StringArray contains a Private p_strArray() As
String)

 
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
Question: Can't pass an Array to a class Charles Excel Programming 5 April 13th 07 06:06 PM
Problems Setting properties of class module Andibevan[_4_] Excel Programming 2 October 2nd 05 01:44 PM
Multidimensional Arrays as Properties in Class Files? Trip[_3_] Excel Programming 8 September 26th 05 06:32 PM
Custom Class and Properties Rich_z[_30_] Excel Programming 4 July 12th 05 04:57 PM
class modules and array Martin Bauer Excel Programming 2 June 5th 05 05:23 PM


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