¼ÐÃD:
[µo°Ý]
VBA ºô¶¶×¤J°ÝÃD(·|©w®æªü~)
[¥´¦L¥»¶]
§@ªÌ:
esad0101
®É¶¡:
2013-8-1 09:33
¼ÐÃD:
VBA ºô¶¶×¤J°ÝÃD(·|©w®æªü~)
§Ú»Ýn¤@ӶפJºô¶¦ÜExcel ¥\¯à¤j¬ù¨C30¬í§ó·s¤@¦¸,¦ý¥un¤@¶]QueryTable.Refresh , Excel´N·|Excel©w®æ3¬í¥ª¥k¡A¤£¯à°µ¨ä¥L°Ê§@¡C¦³¨S¦³¤èªk¥i¥H§ïµ½¡C
¦]¬°¶×¤Jºô¶§ó·s¥u¯à³]©w1¤ÀÄÁ¡C©Ò¥H¥u¦n¼g¤U±ªºµ{¦¡(n¨C30¬í§ó·s)
Sub RefreshWeb()
Workbooks("xxx.xls").Worksheets("Sheet1").Range("A1").QueryTable.Refresh BackgroundQuery:=False
DoEvents
Workbooks("xxx.xls").Sheets("Sheet2").Range("B10") = Now + TimeValue("00:00:30") '¤U¦¸§ó·s®É¶¡
Application.OnTime Workbooks("xxx.xls").Sheets("Sheet2").Range("B10"), "ThisWorkbook.RefreshWeb", Schedule:=True
End Sub
§@ªÌ:
joey0415
®É¶¡:
2013-8-2 21:00
¦A¶}¤@ÓµêÀÀ¾÷¾¹¨Òvmµ¥¡A±Nexcel±qùر¶}±Ò°õ¦æÀ³¸Ó´N¤£·|¤F
Åwªï¥úÁ{ ³Â»¶®a±Ú°Q½×ª©ª© (http://forum.twbts.com/)