Thread: type error
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
David Gerstman David Gerstman is offline
external usenet poster
 
Posts: 57
Default type error

Here's my code:

Private Sub cbAddContents_Click()

Dim ind As Integer
Dim tot_items As Integer

tot_items = ListBox1.ListCount
For ind = 1 To tot_items

If ListBox1(ind).Checked = True Then
Worksheets("SF 701").Cells(8, 1).Offset(0, ind).Value =
ListBox1(ind).Value
End If
Next ind

When I get to the if statement, I get a Type Mismatch error. What am I doing
wrong?

David