下面的例子中,转换数字0到9的相应英文名称为阿拉伯数字: 1、普通的方法:Select Case LCase$(word) Case "zero" result = 0 Case "one" result = 1 Case "two" result = 2 Case "three" result = 3 Case "four" result = 4 Case "five" result = 5 Case "six" result = 6 Case "seven" result = 7 Case "eight" result = 8 Case "nine" result = 9 End Select 2、更加简练的方法:result = InStr(";zero;;one;;;two;;;three;four;;five;;six;;;seven;eight;nine;",";" & LCase$(word) & ";") \ 6
共 1 个关于本帖的回复 最后回复于 2013-7-11 11:15