It is possible to alternate the row color in a List Box without writing any code.
A default List Box looks like this:
Here is how to enable alternating row colors without writing any code:
Open the Properties for the List Box in the Form Editor. Scroll down to the Properties 'Background Color' and 'Alternate Background Color'. This is where you set the color to use for the rows in the List Box. Simply click and set the color you desire. Here is a screenshot of the Properties:
Upon viewing the form with the ListBox, you should see that alternating rows are colored based upon the colors you selected.