- ©«¤l
- 218
- ¥DÃD
- 73
- ºëµØ
- 0
- ¿n¤À
- 290
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN10
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2014-5-19
- ³Ì«áµn¿ý
- 2022-11-29
|
[µo°Ý] VBA ¦p¦ó§PÂ_ºô¶ [ÀɮפU¸ü] µøµ¡¬O§_¤w¼u¥X
¥Ø«e¨Ï¥Î¥H¤U»yªk°õ¦æºô¶ÀɮפU¸ü§¡¥¿±`¡A¦ý¥Ø«e¹J¨ì°ÝÃD¬°¡G
¦]¬°[ÀɮפU¸ü]µøµ¡¼u¥Xªºµ¥«Ý®É¶¡ªøµu¤£©T©w¡A¦³®Éԫܧ֬ù¢°¢¯¬í¡A¦³®ÉÔ«onµ¥¨ì¢°~5¤ÀÄÁ¥H¤W¡C
¥Dn¬O¦]¬°¤½¥qªº¨t²Î°ÝÃD¡A¾ÉP¨C¦¸³]¦n©µ¿ð®É¶¡¡A³£·|¦]¬°¤Ó§Ö©Î¤ÓºC¦V¤UÄ~Äò°õ¦æ¡A¦Ó³y¦¨¤U¸ü³s½u²§±`¾ÉP¤U¸ü¥¢±Ñ¡C
©Ò¥H·Q½Ð°Ý¦b¥H¤U©µ¿ð®É¶¡¡]¦^À³[¦p¦ó³B²z]µøµ¡¡^¤Ï¬õ¦r¨º¬q©µ¿ð2¬íªº»yªk¡A¬O§_¦³¿ìªk§ï¬°§PÂ_ÀɮפU¸üµøµ¡¬O§_¤w¼u¥X¡A¦AÄ~Äò©¹¤U°õ¦æªº»yªk©O¡H¦³³oºØ¸Ñ¨M¿ìªk¶Ü¡H
-------------------------------------------------------------
Sub ¬d¸ß¨C¤é¼Æ¾Ú¨Ã¤U¸üÀÉ®×()
Set myIE = CreateObject("InternetExplorer.Application")
With myIE
.Visible = True
.Navigate "http://xxxxxxxxxxxx/xxx.aspx" '¬d¸ß¼Æ¾Úºô§}
Do While Busy Or .ReadyState <> 4: DoEvents: Loop
.Navigate "http://10.178.1.140:8023/ReportPage/ReportAgentToDay_28_tptv.aspx" '¬d¸ß¼Æ¾Ú·|¦Û°Ê²£¥Í©ó¦¹ºô§}¶±
Do While Busy Or .ReadyState <> 4: DoEvents: Loop
.document.forms(0).all("ctl00_btnDownload").Click 'ÂI¿ï¤U¸ü«ö¶s
End With
' ¦^À³[¦p¦ó³B²z]µøµ¡
Application.Wait Now + TimeValue("0:00:2") '©µ¿ð2¬í**
Application.SendKeys "%{A}" ' «ö[¥t¦s·sÀÉ]Áä
' ¦^À³[¥t¦s·sÀÉ]µøµ¡
Application.Wait Now + TimeValue("0:00:2") '©µ¿ð2¬í
Application.SendKeys "%{N}" ' <alt-N> ¿ï¨ú[ÀɮצWºÙ]Äæ¦ì
Application.SendKeys "{HOME}" & ThisWorkbook.Path & "\" ' ³]©w¦sÀɸô®|
Application.SendKeys "%{S}" ' <alt-S> «ö[¦sÀÉ]Áä
' ¦^À³[½T»{¥t¦s·sÀÉ]µøµ¡
Application.Wait Now + TimeValue("0:00:2") '©µ¿ð2¬í
Application.SendKeys "%{Y}" ' <alt-Y> «ö[¬O]Áä (¦pªG¦P¦WÀɤw¸g¦s¦b)
' ¦^À³[À˵ø¤U¸ü]µøµ¡
Application.Wait Now + TimeValue("0:00:5") '©µ¿ð5¬í
Application.SendKeys "%{C}" ' <alt-C> «ö[Ãö³¬]Áä
myIE.Quit
Set myIE = Nothing
End Sub-------------------------------------------------------------
|
|