- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¥»©«³Ì«á¥Ñ GBKEE ©ó 2013-7-1 10:25 ½s¿è
¦^´_ 1# yuch8663 - Sub Test()
- Dim url As String
- 'url = "URL;http://www.xe.com/zh-HK/currencytables/?from=USD&date=" & a & "-" & b & "-" & c ' ¥¿½Tªº
- 'A,B,C -> YYYY-MM-DD
- url = "URL;http://www.xe.com/zh-HK/currencytables/?from=USD&date=" & Format(Date - 1, "YYYY-MM-DD")
- '¤é´Á¶·¤p©ó·í¤é
- With Sheets("Sheet1")
- .Cells.Clear
- For Each e In .QueryTables
- e.Delete
- Next
- With .QueryTables.Add(Connection:=url, Destination:=.[a1])
- .WebSelectionType = xlSpecifiedTables
- .WebFormatting = xlWebFormattingNone
- .WebTables = """historicalRateTbl"""
- .WebConsecutiveDelimitersAsOne = True
- .WebSingleBlockTextImport = False
- .WebDisableDateRecognition = False
- .WebDisableRedirections = False
- .Refresh BackgroundQuery:=False
- End With
- End With
- End Sub
½Æ»s¥N½X ¦^´_ 5# HSIEN6001
Sub EX¾ã¶¤U¸ü(¼g¤Jªí®æ, ¼g¤J¦ì¸m, theURL) ¨S¥[µù¬O Public ´N¬O¤½¥Îµ{§Ç ¥iª½±µ©I¥s
Private Sub EX¾ã¶¤U¸ü(¼g¤Jªí®æ, ¼g¤J¦ì¸m, theURL) ¥[µù¬°¨p¥Îµ{§Ç
¨p¥Îµ{§Ç ¥ÎRUN ©I¥s
Run "A¤U¸ü¤½¥Îµ{¦¡.EX¾ã¶¤U¸ü", "¼È®É", Sheets("¼È®É").Range("B" & Rows.Count).End(xlUp).Offset(1), "http://siis.twse.com.tw/server-java/STAMAK03?TYPEK=otc&isnew=&colorchg=1&year=102&smonth=01&emonth=12&step=1&order=12"
¤u§@ºÞ²zû¤¤¦³¨SÃö³¬ªºIE,¥i¯à¬O¦bVBA¤¤¶}±Ò«á¨SÃö³¬§a |
|