List 6-49 List 6-48のメソッドの呼び出し例
  1: Dim objCustomers As Customers
  2: Dim objCustomer As Customer
  3: Dim i As Long
  4: Dim mesgs As String
  5:     
  6: Set objCustomers = GetCustomers5
  7:     
  8: For i = 1 To objCustomers.Count
  9:     Set objCustomer = objCustomers.Item(i)
 10:     mesgs = "顧客名=" & objCustomer.CUSTOMERNAME
 11:     mesgs = mesgs & "電話番号=" & objCustomer.TELEPHONE
 12:     mesgs = mesgs & "FAX番号=" & objCustomer.FAX
 13:     MsgBox mesgs
 14:     Set objCustomer = Nothing
 15: Next
 16:    
 17: Set objCustomers = Nothing