I have a repetitive task of loading a file and selecting some items from there.
To avoid doing this manually, I've prepared a LIST of things to be ticked and now trying to automate this.

The app is an external app/window. I've managed to Find the Window/Class/hwnd of control etc...
Then I'm looping through items:

Code:
xRes= SendMessage(LB_Hwnd, LB_SETCURSEL, ByVal CLng(i), ByVal 0)    '''This Works & Selects the Item
xRes= SendMessage(LB_Hwnd, LB_SETSEL, ByVal CLng(1), ByVal CLng(i)) ''Doesn't work now <<<<<<<
So it was all working until i restarted the PC and tested again. Now the CLICK isn't working!! Not selecting the checkbox of the list control.

Why is LB_SETSEL failing all of a sudden?