¥»©«³Ì«á¥Ñ swatt ©ó 2011-7-19 14:23 ½s¿è
½Ð±Ð¦U¦ì°ª¤â¤j¤j,
¦bºô¸ô¤W¦³§ä¨ì¤@Ó¥ÎVBA±Nhex string Âন bin string ªº¤èªk¡A¦p¤U:
¨ä¤¤¤@¥y, cix = CInt("&H" & hdgt) ,¤@ª½¬Ý¤£À´¦¹¼gªk·N¸q? //ª`·NH«e¤Ö¤@Ó& ¡Acix = CInt("&H" & hdgt)
½Ð¦U¦ì°ª¤âÀ°¦£¸Ñµª¤@¤U¡AÁÂÁ°Õ~
PS:¤£ª¾¹D¬°¤°»ò"&"¦b½s¿è®É¬Ý±o¨ì¡A¦ý½s¿è§¹¦¨¤§«á«o¦³¨Ç¦a¤è¬Ý±o¨ì¡A¦³¨Ç¦a¤è¬Ý¤£¨ì¡A©Ç©Çºw.....
-----------------------------------------------------------------
Sub h2b()
cnvarr = Array("0000", "0001", "0010", "0011", _
"0100", "0101", "0110", "0111", "1000", _
"1001", "1010", "1011", "1100", "1101", _
"1110", "1111")
bstr = ""
mystr = "ABC"
For i = 1 To Len(mystr)
hdgt = Mid(mystr, i, 1)
cix = CInt("&H" & hdgt) //ª`·NH«e¤Ö¤@Ó& ¡Acix = CInt("&H" & hdgt)
bstr = bstr & cnvarr(cix) //ª`·N bstr ©M cnvarr(cix)¤§¶¡¤Ö¤@Ó&
Next
End Sub
----------------------------------------------------------------- |