check out the ChtFrmla example

http://www.oaltd.co.uk/Excel/Default.htm