0
的案例聲明我收到指出錯誤使用了一系列數字
結束語句錯誤預期
我應該使用,除了to
的東西嗎?我試過or
和&
,並且收到類似的錯誤。
Dim interp As String = ""
Select Case BmiValue
Case Is < 18.5
interp = "Underweight"
Case Is <18.5 to >=24.9
interp = "Normal"
Case Is <24.9 to >=29.9
interp = "Overweight"
Case Else >/= 30.0
interp = "Obese"
我嘗試了這個建議,仍然收到相同的錯誤。我將嘗試複製/粘貼我的所有代碼,看看這是否有助於解決問題。 「的BMI值的迴歸解釋 公共共享功能解釋(BYVAL BmiValue作爲雙人)作爲字符串 昏暗的interp作爲字符串=‘’ 選擇事例BmiValue 情況<18.5的interp =‘體重不足’ 情況<18.5 to > = 24.9口譯=「正常」 情況<24.9 to > = 29.9插補=「增持」 案例品>/= 30.0插補=「肥胖」 最終選擇 返回插補 端功能 末級 –
錯誤仍然說「語句的結束預期'所有的'案件是'行 –
我編輯了我的答案。你需要把'interop =「字符串」'放在一個單獨的行上。 –