Class Property Arrays in VB6?

Posted on 2006-06-02
Last Modified: 2013-11-23
Is this possible?

How would I change the following class property in VB6 to an ARRAY?

Private mvarProduct         As String

Public Property Let Product(ByVal vData As String)
    mvarProduct = vData
End Property

Public Property Get Product() As String
    Product = mvarProduct
End Property

Question by:born4code
    1 Comment
    LVL 13

    Accepted Solution

    Hi born4code

    Private mvarProduct(100) As String

    Public Property Let Product(ByVal Index As String, ByVal vData As String)
        mvarProduct(Index) = vData
    End Property

    Public Property Get Product(ByVal Index As String) As String
        Product = mvarProduct(Index)
    End Property


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
    This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
    Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
    This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now