For linesLbo = 0 To frmPizzas.lboTransactionLog.Items.Count
It's been a long while since I've used VB, but I believe Listboxes are 0-based, so you're running one past the end of the item array (for example, if Items.Count
is 10, your Items run from 0-9). You would want to do this instead:
For linesLbo = 0 To frmPizzas.lboTransactionLog.Items.Count - 1