title: VBA - Store an array inside of a class - Type mismatch
body: <p>I've been searching all over but nothing seems to do the trick for me. Here is the problem:</p>
  
  <p>I want to store an array of "keys"
  Here is my simple class:</p>
  
  <pre><code>Private pkeys_length As Integer
  Private pkeys() As String
  Public Property Get keys_length() As Integer
      keys_length = pkeys_length
  End Property
  Public Property Let keys_length(arg As Integer)
      pkeys_length = arg
  End Property
  Public Property Get Keys() As String
      Keys = pkeys()
  End Property
  Public Property Let Keys(ByVal arg As String)
      ReDim pkeys(0 To pkeys_length) As String
      pkeys = arg
  End Property
  </code></pre>
  
  <p>And here is what I am trying to store:</p>
  
  <pre><code>Dim str_pkeys() As String
  Dim pkey_count As Integer
  pkey_count = CountPrimaryKeys(stbl)
  'Store the keys of that table
  ReDim str_pkeys(pkey_count) As String
  keyset_1.keys_length = pkey_count
  str_pkeys = FindPrimaryKeys(keyset_1.Table)
  keyset_1.Keys = str_pkeys
  </code></pre>
  
  <p>As it stands, it Gives the error <code>Compile Error: Type mismatch</code>
  I have had several problems while storing the array, I'm not sure if I am actually getting anywhere. This is the only error I haven't been able to fix. All I need to be able to do is store the array of strings in the class.</p>
  
  <p>Anyone familiar with how to go about this? </p>