Private Sub Worksheet_Calculate()
If Not IsError(Range("q2")) Then
If Range("Q2").Value > Range("R1").Value And Range("Q1").Value = 1 And flag = True Then
CreateObject("Wscript.shell").Popup Range("Q2").Value
End If
End sub
----------------------------------------------------
想在 CreateObject("Wscript.shell").Popup Range("Q2").Value 之後
暫停3分鐘繼續執行,如何做?作者: t8899 時間: 2013-7-20 09:31
Application.StatusBar = "還剩 " & Format(T - Time, "hh:mm:ss") '狀態列顯示剩餘時間
End If
Loop
Application.StatusBar = False '狀態列顯示為 [就緒]
End Sub
複製代碼
作者: t8899 時間: 2013-7-23 10:38
我把
Dim ws As Object
Set ws = CreateObject("wscript.shell")
套進去, 設定1秒關閉,但它為何在15-30 秒之間才會關閉 ??
-----------------------------------------------------
Private Sub Worksheet_Calculate()
Dim ws As Object
Set ws = CreateObject("wscript.shell")
If Not IsError(Range("Q5")) Then
If (Range("Q5").Value < Range("Q6").Value) And Range("S8").Value = 2 And flag = True Then
ws.Popup "xxxxxxx=>正在殺 " & (Range("Q5").Value), 1, "Auto Closed MsgBox"
Cells(1, 13).Interior.ColorIndex = 2
' flag = False
Range("Q6").Value = Range("Q6").Value - Range("R4").Value
Range("R6").Value = Range("R6").Value - Range("R4").Value
flag = True
Cells(1, 13).Interior.ColorIndex = 8
End If
End If
end sub作者: GBKEE 時間: 2013-7-23 11:02