Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Class Property Arrays in VB6?

Posted on 2006-06-02
1
Medium Priority
?
323 Views
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

Thanks!
0
Comment
Question by:born4code
1 Comment
 
LVL 13

Accepted Solution

by:
iHadi earned 2000 total points
ID: 16821068
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


0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…
Suggested Courses

580 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