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

(µo°Ý)WEB¬d¸ß¡A¦p¦ó¨ú®ø¸õ¥XªºÄµ§iµøµ¡

¦^´_ 16# 7777


    ¸Õ¸Õ¬Ý§a!
  1. Sub test()
  2.     Dim x
  3.     Dim oie As Object: Set oie = CreateObject("internetexplorer.application")
  4.     With oie
  5.         .Visible = True
  6.         .Navigate ""
  7.         Do While .readystate <> 4 Or .busy: DoEvents: Loop
  8. Set wshshell = CreateObject("wscript.shell")

  9. Do
  10.     ret = wshshell.AppActivate("Microsoft Excel")
  11. Loop Until ret = True

  12.     Application.Wait Now + 2 / 86400
  13.     ret = wshshell.AppActivate("Microsoft Excel")
  14.         If ret = True Then
  15.                    ret = wshshell.AppActivate("Microsoft Excel")
  16.                 Application.Wait Now + 2 / 86400
  17.                 wshshell.SendKeys "{enter}"
  18.         End If
  19.         Application.Wait Now + 2 / 86400
  20.         Do While .readystate <> 4 Or .busy: DoEvents: Loop
  21.         .Quit
  22.     End With
  23. End Sub
½Æ»s¥N½X
¤@¤À§V¤O¡A¤@¤À¦¬Ã¬¡C
µo°ÝÃD«e¥i¥H¥ý·j¯Á¤º¤å¬O§_¦³¬ÛÃö½d¨Ò¡C

TOP

¦^´_ 18# 7777


    ºô§}3­Óªº¸Ü­n¬Ý§AŪ¨ú¶¶§Ç¡A²q§AÀ³¸Ó³£¬O¤À§åŪ¨ú§a¡A¥u­n¦bºô§}¦a¤è§ï¦¨¦r¦ê¦A¥Î°j°é¤è¦¡­«½Æ³o¬qµ{§Ç§Y¥i¡A
©Î¬O§A¥i¥Hªþ¤W§Aªº³Ì·s¶i«×ÀɮסA³o¼Ë¤ñ¸û²M·¡§Aªº°ÝÃDÂI¡C
¨ä¹ê³o¬qµ{§Ç¥u¬OÅý§A´ú¸Õ¥Î¡A±q²Ä7¦C¶}©l¤~¬O­«ÂI¡C
  1. Sub test()
  2.     Dim oie As Object: Set oie = CreateObject("internetexplorer.application")
  3.     With oie
  4.         '.Visible = True '³o³¡¤Àµù¸Ñ±¼¤]¨SÃö«Y¡Aµù¸Ñ±¼¤£·|Åã¥Ü­I´ºÁÙ¬O·|°õ¦æ¸òFalse¤@¼Ë¡A¦]¬°´ú¸Õ©Ò¥H»Ý¶}±Òµe­±½T»{«áÄòµ{§ÇµL»~
  5.         .Navigate "" '¿é¤Jºô§}
  6.         Do While .readystate <> 4 Or .busy: DoEvents: Loop
  7. Set wshshell = CreateObject("wscript.shell") '¤Þ¥Î¨ä¥¦ª«¥ó¡A©I¥s¨ä¥¦À³¥Îµ{¦¡

  8. Do '°j°éÀ³¥Îµ{¦¡¤¤«ü©wª«¥ó
  9.     ret = wshshell.AppActivate("Microsoft Excel") '§ä´M¤Þ¥Îª«¥ó¦WºÙ¡A¦pªG¸õ¥Xµøµ¡¼ÐÃD¬O"ºô­¶°T®§"­×§ï¦¨Äµ§i°T®§¼ÐÃD
  10.     '³¯­z¦¡AppActivate¼ÐÃD [µ¥«Ý]
  11. Loop Until ret = True '·íret¦³­È®Éµ²§ô°j°é

  12.     Application.Wait Now + 2 / 86400 '³o³¡¤À¨ä¹ê¥i¥H¤£µ¥«Ý
  13.     ret = wshshell.AppActivate("Microsoft Excel")
  14.         If ret = True Then
  15.                    ret = wshshell.AppActivate("Microsoft Excel")
  16.                 Application.Wait Now + 2 / 86400 '³o¸Ì¤@©w­nµ¥«Ý2¬í¡A¨ä¹ê®É¶¡¤£¤@©w¡A¥u¬OSendKeys³o­Ó°Ê§@±`±`µo¥Í¤£Ã­©w©Ê°ÝÃD¡A½T«Oµ{§Ç¨S°ÝÃD¤~°õ¦æenter³o°Ê§@
  17.                 wshshell.SendKeys "{enter}" '¹ïĵ§i°T®§µøµ¡«ö¤UÁä½Lenter«öÁä
  18.         End If
  19.         Application.Wait Now + 2 / 86400 'µ¥«Ý2¬í
  20.         Do While .readystate <> 4 Or .busy: DoEvents: Loop '½T»{ºô­¶¸ü¤J§¹¦¨
  21.         .Quit 'Ãö³¬ºô­¶
  22.     End With
  23. End Sub
½Æ»s¥N½X
¥H¤W¬O§Ú¥H«e±q³Â»¶®a±Ú¬Y­Ó¦a¤èCopy¹L¨Óªº(§Ñ°O¨Ó·½¤F...©êºp)¡A§Ú¹ê»Ú¥Î¤W¬O°w¹ï·|¸õ¥Xĵ§iµøµ¡¦a¤è¥[¤J¥H¤Uµ{§Ç§Y¥i¡C
  1. Set Wshshell = CreateObject("wscript.shell")'·s¼WWshshell¬°©I¥s¨ä¥¦À³¥Îµ{¦¡ª«¥ó
  2. Application.Wait Now + 2 / 86400'µ¥«Ý2¬í
  3. ret = Wshshell.AppActivate("ºô­¶°T®§")'retÀ³¥Îµ{¦¡¤¤¬O§_¦³"ºô­¶°T®§"Title
  4. If ret = True Then'½T»{¦³°õ¦æ
  5. Wshshell.SendKeys "{enter}"'Áä½L¾Þ§@enter«ü¥O
  6. End If
½Æ»s¥N½X
¤@¤À§V¤O¡A¤@¤À¦¬Ã¬¡C
µo°ÝÃD«e¥i¥H¥ý·j¯Á¤º¤å¬O§_¦³¬ÛÃö½d¨Ò¡C

TOP

        ÀR«ä¦Û¦b : ¨ü¤HÂI¤ô¤§®¦¡A¶··í´é¬u¥H³ø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD