以下是引用moonmybox在2008-4-30 13:30:00的发言:楼主好厉害.正为这个烦恼,你实在太好了 但是,我想问一下,小数位后没有数字,例1000,能否实现不出现no cent的字样?one thousand 同理,假如只有小数,例0.01,能否实现不出现no dollar的字样?只显示one cent 该怎么样? 试试看: Select Case Dollars Case "": Dollars = "" Case "One": Dollars = "One Dollar" Case Else: Dollars = Dollars & " Dollars" End Select Select Case Cents Case "": Cents = "" Case "One": Cents = " and One Cent" Case Else: Cents = " and " & Cents & " Cents" End Select SpellNumber = Dollars & Cents SpellNumber = Replace(SpellNumber, " ", " ") End Function
|