ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] hex string Âন bin string

[µo°Ý] hex string Âন bin string

¥»©«³Ì«á¥Ñ 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
-----------------------------------------------------------------

¤@¬Ý´N¬O¿ù»~ªº«äºû
cix = CInt("H" & hdgt)
cint¨ç¼Æ~±j¨îÂà´«¬°¾ã¼Æ«¬ºA
¦ý¤£¥i¯à§â¤å¦r"HA"Âà´«¬°¼Æ¦r

TOP

¥»©«³Ì«á¥Ñ swatt ©ó 2011-7-19 14:19 ½s¿è

¦^À³oobird ¤j¤j,
H«e¤Ö¤F¤@­Ó&¡A(¥Î½s¿è¬Ý±o¨ì&¡A¶K¤W«á´N¬Ý¤£¨ì¤F??)
cix = CInt("&H" & hdgt)
§Ú¦³¸Õ¹L½T¹ê¥i¥H¥Î¡C
¦A³Â·Ð¤j¤j¬Ý¤@¤U¡C

PS:³o¥y¤]¤Ö¤F¤@­Ó &
bstr = bstr & cnvarr(cix)

TOP

        ÀR«ä¦Û¦b : ¡i¦æµ½­n¤Î®É¡j¦æµ½­n¤Î®É¡A¥\¼w­n«ùÄò¡C¦p¿N¶}¤ô¤@¯ë¡A¥¼¿N¶}¤§«e¤d¸U¤£­n°±º¶¤õ­Ô¡A§_«h­«¨Ó´N¤Ó¶O¨Æ¤F¡C
ªð¦^¦Cªí ¤W¤@¥DÃD