Board logo

標題: 簡化程式碼 [打印本頁]

作者: tinching    時間: 2010-5-24 04:07     標題: 簡化程式碼

請教各位,下列程式碼該如何簡化?謝謝!
If [B80] = 1 Then
    Application.Run ("InsertOrder")
End If
If [B80] = 2 Then
    Application.Run ("InsertOrder")
End If
If [B80] = 3 Then
    Application.Run ("InsertOrder")
End If
If [B80] = 4 Then
    Application.Run ("InsertOrder")
End If
If [B80] = 5 Then
    Application.Run ("InsertOrder")
End If
If [B80] = 6 Then
    Application.Run ("InsertOrder")
End If
If [B80] = 7 Then
    Application.Run ("InsertOrder")
End If
If [B80] = 8 Then
    Application.Run ("InsertOrder")
End If
作者: Hsieh    時間: 2010-5-24 08:50

If [B80] >= 1 And [B80] <= 8 Then
    Application.Run ("InsertOrder")
End If




歡迎光臨 麻辣家族討論版版 (http://forum.twbts.com/)