Hex to Decimal
===========
CLng("&H" & HexString)

Octal to Decimal
============
CLng("&" & OctalString) or CLng("&O" & OctalString)

Decimal to Binary
============
NOTE:
You can limit the size of the returned answer by specifying the number of
bits

Function Dec2Bin(DecimalIn As Long, _
Optional NumberOfBits As Variant) As String Dec2Bin = ""
Do While DecimalIn <> 0
Dec2Bin = Trim$(Str$(DecimalIn Mod 2)) & Dec2Bin
DecimalIn = DecimalIn \ 2
Loop
If Not IsMissing(NumberOfBits) Then
If Len(Dec2Bin) > NumberOfBits Then
Dec2Bin = "Error - Number too large for bit size specified" Else
Dec2Bin = Right$(String$(NumberOfBits, "0") & _ Dec2Bin, NumberOfBits)
End If
End If
End Function

Binary to Decimal
============
Function Bin2Dec(BinaryString As String) As Long
Dim X As Integer
For X = 0 To Len(S) - 1
Bin2Dec = Bin2Dec + Val(Mid(S, Len(S) - X, 1)) * 2 ^ X
Next
End Function

--------------------------------------
From: Rick Rothstein (fnroth@aosi.com)

    Source: geocities.com/time_edge/software

               ( geocities.com/time_edge)