Dim s As String, st As Long, ch As Integer
Dim i As Integer, n As Integer
n = Len(s)
st = 0
For i = 1 To n
ch =
st = st + ch * 2 ^ (i - 1)
next i
Text2.Text = Str(st) End Sub
微信扫码预览、分享更方便