Mohamed,
You'll probably need to loop through each character, using the VB Hex() function, and then another internal loop to check if each bit is on or off. Haven't tested it, but something like:
for i=1 to len(strInput)
strHexOutput=strHexOutput & Hex(mid(strInput,i,1))
for j=7 to 0 step -1...