• 瀏覽: 5,242
  • 回覆: 1
[隱藏]
 試吓將b1&b2&b3組成code再用case去分流,應該會簡潔啲...


回覆 引用 TOP

熱賣及精選
咁寫都會簡潔啲...
複製內容到剪貼板
代碼:
Sub check()
Dim b1 As Boolean, b2 As Boolean, b3 As Boolean
b1 = True: b2 = False: b3 = False
Select Case b1 + b2 + b3
Case -3
MsgBox "TTT"
Case 0
MsgBox "FFF"
Case -2
MsgBox "TTF/TFT/FTT"
Case -1
MsgBox "TFF/FFT/FTF"
End Select
End Sub



熱門主題
相關主題
[按此隱藏 Google 建議的相符內容]