Unknown tab ID error in the middle of program

I keep getting unknown tab ID error in the middle of program.

It runs for a while then gives that error after working correctly for a while.