On Sep 25, 2006, at 2:08 PM, Phil M wrote:

Function KeyStartsWithString(Extends d As Dictionary) As String()
  Dim matchedList() As String
  For Each v As Variant In d.Keys
    If (v.Type = Variant.TypeString) Then
      // want to limit the match to beginning of string
If v.StringValue.InStr(searchStr) = 1 Then matchedList.Append (v.StringValue)
    End If
  Next
  matchedList.Sort
  Return matchedList
End Function

Sorry, there was an "s" variable in the last post... changed it to "v.StringValue".

Also, I added a Sort just before the end, so everything is in nice alphabetical order.

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to