Bin to Dec w Mess

A Snippet from: hagchr

Let>BinVal=10111010001000010
VBEval>Execute("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)"),

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

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

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!