Dual Boot PC: Error on Replacing Windows Vista with Windows 7

I installed Windows Vista Ultimate and Ubuntu 9.10 on my computer. Now, I wanted to replace Windows Vista with Windows 7 without losing my Ubuntu 9.10. I tried to reformat Vista so I overwrite it with Windows 7. Since then, I started getting an error message. I noticed that my Drive C and Drive D have merged together giving me a bigger unallocated space. I have parted them again using my Ubuntu and Windows 7 installation disks but the resulting partition is only one and still giving me the same error message. I believe the partition only contains my Ubuntu. I tried formatting it again but I was still unable to do it correctly. Please give me an advice on how to format my Windows Vista with Windows 7. I wanted to keep my Ubuntu. Thanks.
