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

[µo°Ý] °T®§¤è¶ô¦p¦ó³]©w¹w³]­È

[µo°Ý] °T®§¤è¶ô¦p¦ó³]©w¹w³]­È

¦U¦ì¤j¤j¦n¡A¤p§Ì³Ìªñ¦b½m²ß°T®§¤è¶ô¡A­­©w®É¶¡«á®ø¥¢¥\¯à
¦ý½Ð°Ý¦p¦ó³]©w®É¶¡¤º¨S¿ï¾Ü¡A¦Û°Ê¿ï¨úÃþ¦ü"¤¤¤î"¦Ó¤£¬OÃö³¬¤è¶ô¥\¯à!!
¥ýÁÂÁ¦U¦ì¤j¤jªº¸Ñµªêy!!

Option Explicit
Sub 111()
    'Windows Script Host Object Model³]©w¤Þ¥Î¶µ¥Ø
    Dim myWsh As IWshRuntimeLibrary.WshShell
   
    Set myWsh = CreateObject("Wscript.Shell")
    Debug.Print myWsh.PopUp(Text:="WSH´ú¸Õ", _
        SecondsToWait:=2, Title:="WSHPopUp", Type:=2)
    Set myWsh = Nothing                 'ÄÀ©ñª«¥ó
End Sub

¦U¦ì¤j¤j¦n¡A¤p§Ì³Ìªñ¦b½m²ß°T®§¤è¶ô¡A­­©w®É¶¡«á®ø¥¢¥\¯à
¦ý½Ð°Ý¦p¦ó³]©w®É¶¡¤º¨S¿ï¾Ü¡A¦Û°Ê¿ï¨úÃþ¦ü"¤¤¤î ...
lichang µoªí©ó 2015-7-26 00:15


¤£ºÞ¦³¨S¦³¿ï¨ú¡A°T®§¤è¶ô¥\¯à³£·|Ãö³¬¡A§A¥i¥H°w¹ï°T®§¤è¶ôªº¦^¶Ç­È¨Ó¥[¤W¹ïÀ³ªº³B²zµ{§Ç...

°Ñ¦Ò»¡©ú:
https://technet.microsoft.com/en-us/library/ee156593.aspx

½d¨Ò:
  1. Option Explicit

  2. Sub Ex()
  3.     'Windows Script Host Object Model³]©w¤Þ¥Î¶µ¥Ø
  4.     Dim myWsh As IWshRuntimeLibrary.WshShell
  5.     Dim intClicked As Integer
  6.     Dim intDefaultButton As Integer: intDefaultButton = vbDefaultButton1
  7.    
  8.     Set myWsh = CreateObject("Wscript.Shell")
  9.     intClicked = myWsh.PopUp(Text:="WSH´ú¸Õ", _
  10.         SecondsToWait:=2, Title:="WSHPopUp", Type:=vbAbortRetryIgnore + intDefaultButton)
  11.         
  12.     Debug.Print intClicked
  13.    
  14.     If -1 = intClicked Then ' ¦^¶Ç­È (-1) = ³]©w®É¶¡¤º¨S¿ï¾Ü
  15.         If vbDefaultButton1 = intDefaultButton Then
  16.             intClicked = vbAbort
  17.         ElseIf vbDefaultButton2 = intDefaultButton Then
  18.             intClicked = vbRetry
  19.         ElseIf vbDefaultButton3 = intDefaultButton Then
  20.             intClicked = vbIgnore
  21.         End If
  22.     End If
  23.    
  24.     Select Case intClicked
  25.     Case vbAbort
  26.         '¥[¤W [¤¤¤î] ¹ïÀ³³B²zµ{§Ç
  27.     Case vbRetry
  28.         '¥[¤W [­«¸Õ] ¹ïÀ³³B²zµ{§Ç
  29.     Case vbIgnore
  30.         ' ...
  31.     Case Else
  32.         ' ...
  33.     End Select
  34.         
  35.     Set myWsh = Nothing                 'ÄÀ©ñª«¥ó
  36. End Sub
½Æ»s¥N½X

TOP

¤j¤j¡A½Ð°Ý¤@¤U¡A¬°¤°»ò§Ú¨Ï¥Î±zªº¥N½Xª½±µ½Æ»s¡A¥L·|¸ò§Ú»¡
Dim myWsh As IWshRuntimeLibrary.WshShell
"¨Ï¥ÎªÌ¦Û­q«¬ºA©|¥¼©w¸q"

TOP

¦^´_ 3# lichang
§Aµ¹ªº½d¨Òµ{¦¡¤¤µù¸Ñ¦³»¡©ú('Windows Script Host Object Model³]©w¤Þ¥Î¶µ¥Ø)
¦b[¤u¨ã] [³]©w¤Þ¥Î¶µ¥Ø] ­n ¤Ä¿ï Windows Script Host Object Model¡A¦p¤U¹Ï:

TOP

¦^´_ 4# azrael19

³á......§Ú¤F¸Ñ¤F¡A¹ï¤£°_¡A§Ú²¨©¿¤F!!ÁÂÁ§Aªº¸Ñµª!!

TOP

        ÀR«ä¦Û¦b : ¤@¥y·Å·xªº¸Ü¡A´N¹³©¹§O¤H¨­¤WÅx­»¤ô¡A¦Û¤v·|ªg¨ì¨â¤Tºw¡C
ªð¦^¦Cªí ¤W¤@¥DÃD