How to convert Octal to Decimal number
Posted on January 4, 2009
1 2 3 4 5 6 7 8 9 10 | 'Coding Basics - How to convert Octal to Decimal number Public Function ConvertOctalToDecimal(BinVal As String) As String Dim iVal#, temp#, i%, Length% Length = Len(BinVal) For i = 0 To Length - 1 temp = CInt(Mid$(BinVal, Length - i, 1)) iVal = iVal + (temp * (8 ^ i)) Next i ConvertOctalToDecimal = iVal End Function |