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

[µo°Ý] VBA ¦p¦ó§PÂ_ºô­¶ [ÀɮפU¸ü] µøµ¡¬O§_¤w¼u¥X

[µ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¦³®É­Ô«o­nµ¥¨ì¢°~5¤ÀÄÁ¥H¤W¡C
¥D­n¬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-------------------------------------------------------------
*¦v¤k¤@ªTµL»~*

        ÀR«ä¦Û¦b : ¡i°±º¢¤£«e¡A²×µL©Ò±o¡j¤H³£°g©ó´M§ä©_ÂÝ¡A¦]¦Ó°±º¢¤£«e¡FÁa¨Ï®É¶¡¦A¦h¡B¸ô¦Aªø¡A¤]¤FµL¥Î³B¡A²×µL©Ò±o¡C
ªð¦^¦Cªí ¤W¤@¥DÃD