Hey glad it works. 
The code I posted was as a sample program, not assuming anything about your existing code so yes, do adjust any variable # usage to your particular situation.
Enjoy!
_________________________
"If you don't know what you're doing, do it neatly..."