flgFlashControl is never changed within your Do Loop, so it will always be True so the loop will just keep going and going...