Set myRange = Worksheets("order_pool").Range("B1:B299")
result = Application.WorksheetFunction.min(myRange)
If (result.Address.Row > 0) And (result.Address.Row < 3001) Then
Call cal_vol(ByVal 5)
ElseIf (result.Address.Row >= 3001) And (result.Address.Row < 6001) Then
Call cal_vol(ByVal 10)
ElseIf (result.Address.Row >= 6001) And (result.Address.Row < 9001) Then
Call cal_vol(ByVal 50)
Else
MsgBox "error這麼九很奇怪ㄟ你"
End If
End Sub
複製代碼
謝謝各位作者: oobird 時間: 2012-6-19 23:09
result = Application.WorksheetFunction.Min(myRange)
If (result.Address.Row > 0) And (result.Address.Row < 3001) Then
這裡就不合邏輯,沒有這樣表達的!
你應該在工作表上測試,看錯誤中斷在哪裡
光看代碼沒有文件很難找出所有問題。作者: m09903020 時間: 2012-6-20 16:16