It is possible to work out the distance, but not really on the basis of the postcode alone, as the distances you can calculate would be nominal straight-line distances between locations, not the distance of the road network between those locations.
In the UK postcode databases are commercial products licensed by Royal Mail. They sell a product called
Postzon, which lists all UK postcodes and their associated eastings and northings, at a number of levels of accuracy - 100m, 10m and 1m. The 100m product is adequate for this application - approximating distances between postcodes - but this tells you little about the true length of the road network in between those locations.
Commercial GIS (Geographical Information Systems) usually model the road network, and like GPS-based sat-nav systems these can often provide information about the approximate length of the road network between any two junctions.
As commercial products are inevitably involved there is no single-step way to convert eastings and northings or longitude and latitude to road network distances using VBA or a similar approach. It may be possible to use Google's programming interface to Google maps to get the length of the road network, but I can't be sure of this without delving into the Google API.
Ordnance Survey is one of the major map providers in the UK, but their products are also commercial in nature and involve at least a one-off licence fee, with recurrent fees for updates.
-Stewart