I am trying to compare rows between two listbox, while I do compiling, the app has no error.
its showing Out of Bound exception while I am do dragging the listbox scrollbar, but if i move it by using navigate key on keyboard, its running normal without error
I put the code in celltextpaint event,
If Listbox1.cell(row,3)=Listbox2.cell(row,0) then
if column=3 then g.foreColor=&cFF0000
end if
Why are-you comparing Column 3 (from one ListBox) to Column 0 (the other ListBox) ?
OutOfBounds error means you tried to access a non existant Row or Column.
Also, why do you put this code in CellTextPaint ?
Paint man, not Test nor Check; Paint. These lines are not Paint related. Therefore, how many times a second this Event is Fired when you need to Compare only once.