Bin to Dec F

A Snippet from: hagchr

Let>BinVal=10111010001000010
Let>Calc="Bin=""%BinVal%"":Res=0:For I = len(Bin) to 1 step -1:Dig=mid(Bin,I,1):select case Dig:case ""0"":case ""1"":Res=Res+(2^(len(Bin)-I)):end select:Next:MsgBox(""Binary=""&Bin & vbCrLf & ""Decimal="" & Res)"
VBEval>Execute(%Calc%),

Select the code above to paste into your macro. Or: View Raw Text

Link: http://www.mjtnet.com/snip.htm?g=537bc9d18388f

Forum Embed Code - click to select all then copy (CTRL-C):

When pasting into the forum do NOT modify the script code or it will not match what is in the database - create a new snippet instead!