VB Code:
  1. Function ShowDlg(ListView As ListView, ByVal Title As String) As Boolean
  2.     LVExporter.ListView = ListView
  3.    
  4.     Dim selCount As Long, i As Long
  5.     'Determine count of selected entries
  6.     For i = 1 To ListView.ListItems.Count
  7.         If ListView.ListItems(i).Selected Then selCount = selCount + 1
  8.     Next i

Error Message: Runtime Error 91, Object Vairable or With Block Variable not Set.

When ever i run this code in another Poject than mine it works fine.

*The Code is in a ActiveX Control.

Can anyone give me some ideas of how the Code should be?