dim vTemp
vTemp = Clng("&h" & Mid(vKey, lCount * 2 + 1, 2))

doesn't fly, not even if you declare vTemp as an Integer

&hhe is a hex code right? or do you need 6 chars??