You could also try accessing the flash drive via Ubuntu Live USB/DVD, to see if it's properly recognized and if you can reformat it. Also did you try it with a different computer to see if it works properly?
Sometimes when this happens it's because the flash drive might have become faulty and if this is the case, unfortunately, there's not much you can do about it. 🙁