[LEFT][FONT=Courier New][COLOR=#008000]'Contact is a Contact object and ContactsCollection is a PimCollection object.[/COLOR][/FONT]
[FONT=Courier New][COLOR=#0000ff]Sub[/COLOR][/FONT][FONT=Courier New] Globals[/FONT]
[FONT=Courier New][COLOR=#0000ff]End Sub[/COLOR][/FONT]
[FONT=Courier New][COLOR=#0000ff]Sub [/COLOR][/FONT][FONT=Courier New]App_Start[/FONT]
[FONT=Courier New] Form1.Show[/FONT]
[FONT=Courier New] Contact.New1[/FONT]
[FONT=Courier New] ContactsCollection.New1("Contacts")[/FONT]
[FONT=Courier New] ContactsCollection.SortItems("FirstName",false) [/FONT][FONT=Courier New][COLOR=#008000]'sorts the contacts using the first name field.[/COLOR][/FONT]
[FONT=Courier New][COLOR=#0000ff]For [/COLOR][/FONT][FONT=Courier New]i = 0 [/FONT][FONT=Courier New][COLOR=#0000ff]to [/COLOR][/FONT][FONT=Courier New]ContactsCollection.Count - 1[/FONT]
[FONT=Courier New] Contact.Value = ContactsCollection.GetItem(i)[/FONT]
[FONT=Courier New] ListBox1.Add(Contact.FirstName & " " & Contact.LastName) [/FONT][FONT=Courier New][COLOR=#008000]'Add the contact's first and last name to ListBox1.[/COLOR][/FONT]
[FONT=Courier New][COLOR=#0000ff]Next[/COLOR][/FONT][/LEFT]
[FONT=Courier New][COLOR=#0000ff]End Sub
[/COLOR][/FONT]