Results 1 to 2 of 2

Thread: creating an array type property in activex control

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2002
    Posts
    2

    creating an array type property in activex control

    Hi !!!!

    The problem is same ,I am sending the sample code and readme file

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    I'm sorry I'm not sure where you are from but it's hard for me to understand you and what you are wanting. Is this what you want, an array property like the list of a listbox?

    VB Code:
    1. Private m_List() As String
    2.  
    3. Public Property Get List(ByVal Index As Long) As String
    4.     List = m_List(Index)
    5. End Property
    6.  
    7. Public Property Let List(ByVal Index As Long, ByVal Value As String)
    8.     If Index > UBound(m_List) Then
    9.         Err.Raise vbObjectError + 512, "List", "Index Out of Bounds"
    10.         Exit Property
    11.     End If
    12.    
    13.     m_List(Index) = Value
    14. End Property
    15.  
    16.  
    17. Public Sub AddItem(ByVal Value As String)
    18.     ReDim Preserve m_List(UBound(m_List) + 1)
    19.     m_List(UBound(m_List)) = Value
    20. End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width