Function hex2dec(hex As Variant)hex2dec = val("&h" + hex)End Function
и юзай dec2hex и hex2dec как обычные функции