c列表到詞典
把壹個字符變成壹個數字,Private function chart(strcharas string)為整數select case strcharcase "a "," a" CharToNum = 1 Case "B "," b" CharToNum = 2 Case "C "," c" CharToNum = 3 Case "D "," D " chart onum = 4 Case else chart onum = 5 end select end function '在窗體上添加壹個command 1 button Private Sub command 65。438+0 _ Click()Dim I As Integer Dim tmp As String tmp = " asdrdfsfjsdcabsejsfj " For I = 1 To Len(tmp)Print chart onum(mid(tmp,I,1))'在調試窗口中打印下壹個iEnd Sub。