close

標題:

關於Excel - SpellNumber 問題﹖

發問:

在 Excel 開了( Visual Basic 編輯器 ), 發覺問題是 當我打 ( 123,10 ) 電腦自動編了 ( One Hundred Twenty Three and Ten Cents Only ) 我想修改 Cents 是 沒有 " S " ﹖ 正確 One Hundred Twenty Three and Ten Cent Only 更新: 謝謝 新田美香 的解答! 妳所回覆的答案,仍然未能解決我的問題!請再一次解答!謝謝! 原先 Visual Basic 編輯器,程式碼是 Dollars 。 因工作需要,我修改了少 許。只有 Only 沒有 Dollars。 銀碼毫子 英文單數是用 cent。 銀碼毫子英文雙數是用 cents 。 請問在 Visual Basic 編輯器 有什麼程式碼同時分出 ︰ Ten Cent 和 Thirty Cents ﹖ ( 即是︰當銀碼毫子是單數,理應用 cent 。 當銀碼毫子是雙數,理應用 cents。 )

最佳解答:

我所見過的 Function SpellNumber 是 One Hundred Twenty Three Dollars and Ten Cents, 比你的題目是多了一個英文字 Dollars 希望是相同啦 先在 Visual Basic 編輯器, 找到 Funcion SpellNumber 的 code 在 code 的最後如下幾句 delete: Select Case Cents Case "" Cents = " and No Cents" Case " One " Cents = " and One Cent" Case Else Cents = " and " & Cents & " Cents" End Select 改成: if cents "" then cents = " and " & Cents & " Cents" 其他完全不變。 其實 Function SpellNumber 最大的問題 是 在 Dollars 內 不加 and: 如 1010, Function SpellNumber 會出現 One Thousand Ten 但如出現 One Thousand and Ten 便更佳 2007-04-15 22:59:57 補充: 攪錯咗及亂碼, 應改成:If Cents “” Then Cents = “ and ” & Cents & “ Cent ” 2007-04-16 17:37:50 補充: 其實根據英文的文法, 1 仙 才是用cent, two 以上, ten , twenty ....全部都是用cents當然, 你想改, 亦非常容易, 但請提供以下資料, 以便一併改No CentsOneFiveTenFifteen以上那個是用Cent, 那個是用Cents

其他解答:

此文章來自奇摩知識+如有不便請留言告知

答錯在評價處XD 雖則這個問題是幾年前, 剛考我在找在關這些資料時看到這問題 XD 其實把Visual Base內所有Cents的"s"都delete, 就可以了, 一開始Dim Dollars, Cents, Temp, 這個Cents開始delete "s"554581090DCCD3AC

arrow
arrow
    創作者介紹
    創作者 christi56o4 的頭像
    christi56o4

    快遞百科

    christi56o4 發表在 痞客邦 留言(0) 人氣()