A quick search on Google revealed a HMAC-SHA256 class written in VB6, located here: http://www.vbforums.com/showthread.php?635398-VB6-HMAC-SHA-256-HMAC-SHA-1-Using-Crypto-API
Whilst this is for VB6 (and is native code), it should be straightforward to adapt for use with VBA. As it sounds that you need a worksheet function (i.e. UDF) then you will also need to write this, using the above class.
If you're happy to call .NET assemblies from VBA, then you can simplify your code as most of the calculation work is already done for you (see System.Security.Cryptography, more specifically HMACSHA256). An example (for HMACSHA1, but the principle is the same) is given here: Does VBA have a Hash_HMAC.