hi, i'm on win 7, office 2007
i don't know why but after i show a form (from clicking on a cell in the sheet) i noticed that two lines in the code are not executed.
ADDNew_P_win - is the userform shown (with a listview - LV_clients)
the code is:
the lines are:
verything else works fine.
why does it happen? i can't think of anything...
thanks!.
i don't know why but after i show a form (from clicking on a cell in the sheet) i noticed that two lines in the code are not executed.
ADDNew_P_win - is the userform shown (with a listview - LV_clients)
the code is:
Code:
For i = 1 To ADDNew_P_win.LV_clients.ListItems.Count
If ADDNew_P_win.LV_clients.ListItems.Item(i).Text = Sheets("cliList").Range("b" & p).Text And _
ADDNew_P_win.LV_clients.ListItems.Item(i).SubItems(1) = Sheets("cliList").Range("c" & p).Text Then
ADDNew_P_win.LV_clients.ListItems.Item(i).Selected = True
ADDNew_P_win.Lab_selected_client.Caption = Sheets("cliList").Range("l" & p).Value
ADDNew_P_win.Lab_selected_client_index.Caption = i
Exit For
End If
Next
ADDNew_P_win.LV_clients.ListItems.Item(i).EnsureVisible
ADDNew_P_win.LV_clients.SetFocus
'--------------------------------------------------------
.Height = 333: .Show
the lines are:
Code:
ADDNew_P_win.LV_clients.ListItems.Item(i).EnsureVisible
ADDNew_P_win.LV_clients.SetFocus
why does it happen? i can't think of anything...
thanks!.