What are you using for your partitions???
NTFS?
EXT 2, 3 or 4?
JFS?
XFS?
ReiserFS?
Also, what is your install? Is it UEFI? Also, your sentence is confusing as heck. Are you trying to say:
1) my computer came with Ubuntu originally
2) I installed Windows 8.
3) Didn't like Windows 8, so deleted it and installed Windows 7.
???????????????????????????????
Do this test: grab/download another Linux OS, and see if its installer recognizes your current partitions. Hint: download debian live 8.5 or fedora 24/centOS 7, put it on a USB (via dd command), and see if they recognize your partitions as they actually now exist. Heck, this test may be even better: download and put the latest Gparted Live on a CD (or USB), fire it up, and see if it recognizes the partitions on that hard drive. Elementary Loki's installer is the one used by a lot of Linux distros. If it is not seeing your partitions, I am not optimistic. And if Gaprted Live cannot see those partitions, well, then, from what I and a few others have seen, your only recourse is going to be dd-ing that whole drive. Or, you could, like mentioned above, just stick to what's on it right now. Windows and Ubuntu??...meh, wipe that crapper-stuff off for good and make that HD sing with Loki or Debian or Fedora or....... ;-)