ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ¥Î FindWindow ¥N´À CreateObject("Wscript.shell").Popup ªº¦Û°ÊÃö³¬??

[µo°Ý] ¥Î FindWindow ¥N´À CreateObject("Wscript.shell").Popup ªº¦Û°ÊÃö³¬??

¥»©«³Ì«á¥Ñ t8899 ©ó 2013-8-21 09:20 ½s¿è

¥Ñ©ó CreateObject("Wscript.shell").Popup ªº¦Û°ÊÃö³¬¥\¯à¡A·í¾ã­Ó¤u§@ªíDDE³sµ²¤Ó¦h®É·|¥¢®Ä
·Q¥ÎFindWindow ¨Ó¥N´À¦Û°ÊÃö³¬¥\¯à

¥Î¥H¤U´ú¸Õ§ä¤£¨ìCreateObject("Wscript.shell").Popup ªº°T®§µ¡ ??
Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Sub Worksheet_Calculate()
If FindWindow("XLMAIN", "Auto Closed MsgBox") <> 0 Then msgbox "§ä¨ì"
End Sub
Auto Closed MsgBox  ====>°T®§µøµ¡ªº¼ÐÃD
ÁÙ¦³¥ÎFindWindowJ§ä¨ì«á 3¬íÄÁ¦Û°ÊÃö³¬
³o¬q¥¨¶°­n«ç»ò¼g??

¦^´_ 1# t8899
¤£¦p§ï¥Î³o­ÓAPI
  1. Private Declare Function MsgBoxTest Lib "user32" Alias "MessageBoxTimeoutA" ( _
  2.     ByVal hwnd As Long, _
  3.     ByVal lpText As String, _
  4.     ByVal lpCaption As String, _
  5.     ByVal wType As VbMsgBoxStyle, _
  6.     ByVal wlange As Long, _
  7.     ByVal dwTimeout As Long) As Long

  8. Sub Test()
  9.   MsgBoxTest 0, "2.5¬í«áÃö³¬", "¼ÐÃD", vbYesNo + vbInformation, 0, 2500
  10. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ t8899 ©ó 2013-8-21 10:24 ½s¿è
¦^´_  t8899
¤£¦p§ï¥Î³o­ÓAPI
stillfish00 µoªí©ó 2013-8-21 10:04


msgbox ¥i¥H¿é¥XÅܼƭÈ???
¦p¦ó®M¥Î?
¹³CreateObject("Wscript.shell").Popup sStr2, 3, "Auto Closed MsgBox", 64
sstr2 ¬°ÅܼƭÈ

TOP

¦^´_ 3# t8899
¬Ý¤£À´§A¦A°Ý¤°»ò

TOP

¥»©«³Ì«á¥Ñ t8899 ©ó 2013-8-21 11:55 ½s¿è
¦^´_  t8899
¬Ý¤£À´§A¦A°Ý¤°»ò
stillfish00 µoªí©ó 2013-8-21 11:35

§Ú¤w¸gÀ´¤F¡Aµ¥©ú¤Ñ´ú¸Õ..ÁÂÁÂ!
MsgBoxTest 0, "2.5¬í«áÃö³¬", "¼ÐÃD", vbYesNo + vbInformation, 0, 2500
³o¨â­Ó0ªº¦³¦ó·N¸q?

TOP

¦^´_  t8899
¬Ý¤£À´§A¦A°Ý¤°»ò
stillfish00 µoªí©ó 2013-8-21 11:35


«¬ºA¤£²Å¦X????????????

Private Declare Function MsgBoxTest Lib "user32" Alias "MessageBoxTimeoutA" ( _
    ByVal hwnd As Long, _
    ByVal lpText As String, _
    ByVal lpCaption As String, _
    ByVal wType As VbMsgBoxStyle, _
    ByVal wlange As Long, _
    ByVal dwTimeout As Long) As Long
Private Sub Worksheet_Calculate()
Application.DisplayStatusBar = False

      Dim sStr$
Dim ZZ As Range
      sStr = ""
       sStr2 = ""
   For Each ZZ In Range("c2:c111")
    If Not IsError(ZZ) Then
        If Range("R26").Value = 2 Then Range("U26").Value = 1
         If Range("Q26").Value = 1 And Range("U26").Value = 1 And flag = True Then
      M = Round(ZZ - ZZ.Offset(, 26), 2)
                            If M >= ZZ.Offset(, 2) Then
                              If sStr <> "" Then sStr = sStr & Chr(10)
         sStr = sStr & "===> " & Cells(ZZ.Row, 2).Value & "=====> " & Round(ZZ - ZZ.Offset(, 26), 2) & "===>" & ZZ.Offset(, 26) & "===>" & ZZ
          Application.EnableEvents = False
  ZZ.Offset(, 26) = ZZ
Application.EnableEvents = True
                  End If
                If M <= -ZZ.Offset(, 2) Then
                 If sStr2 <> "" Then sStr2 = sStr2 & Chr(10)
        sStr2 = sStr2 & "===> " & Cells(ZZ.Row, 2).Value & "=====> " & Round(ZZ - ZZ.Offset(, 26), 2) & "===>" & ZZ.Offset(, 26) & "===>" & ZZ
        Application.EnableEvents = False
  ZZ.Offset(, 26) = ZZ
Application.EnableEvents = True
                  End If
    End If
    End If
       Next
  If sStr <> "" Then
   MsgBoxTest 0, "", "", sStr, 0, 2500
'----------------
  If sStr2 = "" Then  
If Range("R26").Value = 1 Then Range("U26").Value = 2
      '    Range("Q26").Value = 2
  ' Application.OnTime Now + TimeValue("00:00:15"), "fff"
    End If      
  '----------------------------------------
     End If
      
     If sStr2 <> "" Then
   MsgBoxTest 0, "", "", sStr2, 0, 2500
  If Range("R26").Value = 1 Then Range("U26").Value = 2
   
      End If

end sub

TOP

¦^´_ 5# t8899
²Ä¤@­Ó°Ñ¼Æ¡A¬Oownerµøµ¡¥y¬`¡A¨S¥Î´N³]0
²Ä¤­­Ó°Ñ¼Æ¡AÀ³¬O»y¨¥ªºID¡A¨S¨Ï¥Î¹L...³£¬O³]¬°¹s
³Ì«á¤@­Ó2500¬°Ãö³¬®É¶¡¡A³æ¦ì²@¬í

TOP

¦^´_  t8899
²Ä¤@­Ó°Ñ¼Æ¡A¬Oownerµøµ¡¥y¬`¡A¨S¥Î´N³]0
²Ä¤­­Ó°Ñ¼Æ¡AÀ³¬O»y¨¥ªºID¡A¨S¨Ï¥Î¹L...³£¬O³]¬°¹s ...
stillfish00 µoªí©ó 2013-8-22 09:42


MsgBoxTest 0, "", "", sStr2, 0, 2500
²Ä¤»¼Ósstr2 ¦³¿ùvbinformation ===>¤£§tÅÜ¼Æ ???
¦ý³æ¯ÂªºÃþ¦üRange("Q26").Value¬O¥i¥Hªº

TOP

        ÀR«ä¦Û¦b : ¤H­n¦Û·R¡A¤~¯à·R´¶¤Ñ¤Uªº¤H¡C
ªð¦^¦Cªí ¤W¤@¥DÃD