Define "memory".... I suppose you are talking about the Harddisk (the thing in your computer that saves all of the data, even when the computer is turned off, usually connected by a SATA or IDE cable to the motherbaord).
Though you could also be talking about the RAM, in which case, no, if you switch the RAM from one computer to the other computer, you won't have your files in the new computer.
When switching Harddisks, pathetic, useless vista will notice your hardware has changed and you will have to re-install the whole system. If you had anything except for vista or Win7, you'd be fine. Just more proof that vista has the intelligence of a compost pile.
If you want to change your OS (OS=operating system, like "vista" or "mac"), you won't be able to just "switch harddisks". You will have to save all of your data to an external Harddisk or something as a backup, reformat the computer harddisk, install Windows 7 on it, and then finally copy all of your backed up data from the external harddisk back to the internal harddisk. (A lot of work).
If you don't have any backup harddisks, you can also shrink the current partition on your harddisk, create a new partition, copy all of your files to that partition, install windows 7 on to the original partition, copy all of the backed up files from the new partition to the windows 7 partition, delete the backup partition, and then expand your windows 7 partition again. However, playing around with partitions is considered to be the most risky and most dangerous thing you can do to a harddisk, since there is a high chance for data loss.
I wish you good luck.
TheComet