我想知道 VBA case 语句是否会运行不止一行代码:
Const HARD = 30
Select Case Hardness
Case "Hard"
If PenetrationRate.Cells(i, 1) >= Hard Then
Total = Total + Metres.Cells(i, 1)
DoEvents
End If
Case "Soft"
If PenetrationRate.Cells(i, 1) < Hard Then
Total = Total + Metres.Cells(i, 1)
DoEvents
End If
End Select