CreateObject("Wscript.shell").Popup 自動關閉功能失效??
- 帖子
- 764
- 主題
- 254
- 精華
- 0
- 積分
- 1031
- 點名
- 0
- 作業系統
- windows 11
- 軟體版本
- OFFICE2021
- 閱讀權限
- 50
- 性別
- 男
- 註冊時間
- 2011-5-30
- 最後登錄
- 2025-7-7
|
我把
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 |
|
|
|
|
|
|
- 帖子
- 5923
- 主題
- 13
- 精華
- 1
- 積分
- 5986
- 點名
- 0
- 作業系統
- win10
- 軟體版本
- Office 2010
- 閱讀權限
- 150
- 性別
- 男
- 來自
- 台灣基隆
- 註冊時間
- 2010-5-1
- 最後登錄
- 2022-1-23
        
|
12#
發表於 2013-7-23 11:02
| 只看該作者
回復 11# t8899
Winddows工作管理員有事在忙,CreateObject("wscript.shell")須等候排程處裡 |
|
|
|
|
|
|