是否能各訴我10進位轉2進位ㄉ方法??<br>
http://www.vbqa.com/discuss/vb.old/read.asp?id=29598
試看看 Public Function DToB(DValue As Long, LenH As Byte) As String Dim i As Byte Dim D As Byte DToB = "" For i = 1 To LenH D = DValue Mod 2 DValue = (DValue - D) / 2 'or DValue = DValue \ 2 DToB = Trim(Str(D)) & Trim(DToB) Next i End Function