Below is some example code I am using. I have changed "itm" to "itm2" (and declared the variable) and "ListView1" to "ListView2" to try and add a second ListView control however it keeps giving an error on "Set itm2 = ListView2.ListItems.Add(, , "2004")" (Type Mismatch)

The code is adding 2004 to the listview but then causing the error. I have spent a while trying to figure out what's going on but have got nowhere.

Anyone have any suggestions?

VB Code:
  1. Dim itm2 As ListItem
  2.  
  3. ListView2.View = lvwReport
  4.  
  5. ListView2.ColumnHeaders.Add , , "Year"
  6. ListView2.ColumnHeaders.Add , , "Grade"
  7.  
  8. Set itm2 = ListView2.ListItems.Add(, , "2004")
  9. itm2.SubItems(1) = "A"