In a medium saucepan over medium heat, combine milk and sugar. Heat to between 234 and 240 degrees F (112 to 116 degrees C), or until a small amount of syrup dropped into cold water forms a soft ball that flattens when removed from the water and placed on a flat surface.
Remove from the heat and stir in margarine, peanut butter and vanilla. Quickly spread into a 9x13 inch dish. Allow to cool almost completely before cutting into squares. Store in an airtight container.