返回列表 上一主題 發帖

CreateObject("Wscript.shell").Popup 自動關閉功能失效??

我把
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

TOP

回復 11# t8899
Winddows工作管理員有事在忙,CreateObject("wscript.shell")須等候排程處裡
感恩的心......(在麻辣家族討論區.用心學習會有進步的)
但資源無限,後援有限,  一天1元的贊助,人人有能力.

TOP

        靜思自在 : 稻穗結得越飽滿,越會往下垂,一個人越有成就,就要越有謙沖的胸襟。
返回列表 上一主題