gibbo1715
09-16-2005, 12:56 PM
I am trying to figure out how to add an item to a tree view only if the value in column E is y
Im trying the code below which doesnt cause an error but also doesnt work,
can anyone assist please,
works fine without the "If Cells(t, 4).Value = "y" Then " line?:banghead:
Dim i As Integer
i = Sheets("Customer").Range("A63556").End(xlUp).Row
With TreeView1.Nodes
Set X = .Add(, , "Customer", "Customer")
For t = 2 To i
If Cells(t, 4).Value = "y" Then
Set X = .Add("Policies", 4, , Sheets("Customer").Cells(t, 1))
End If
Next
End With
AddCounter
Set X = Nothing
Thanks again
Gibbo
Im trying the code below which doesnt cause an error but also doesnt work,
can anyone assist please,
works fine without the "If Cells(t, 4).Value = "y" Then " line?:banghead:
Dim i As Integer
i = Sheets("Customer").Range("A63556").End(xlUp).Row
With TreeView1.Nodes
Set X = .Add(, , "Customer", "Customer")
For t = 2 To i
If Cells(t, 4).Value = "y" Then
Set X = .Add("Policies", 4, , Sheets("Customer").Cells(t, 1))
End If
Next
End With
AddCounter
Set X = Nothing
Thanks again
Gibbo