- ©«¤l
- 16
- ¥DÃD
- 10
- ºëµØ
- 0
- ¿n¤À
- 68
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- 2003
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2015-2-26
- ³Ì«áµn¿ý
- 2021-10-4
|
VBA§ì¶°«O¸ê®Æ
¥»©«³Ì«á¥Ñ tsunamix03 ©ó 2017-4-15 22:23 ½s¿è
¦U¦ì¤j¤j¦n
½Ð±Ð¤@¤U§Ú¥ÎVBA§ì¶°«O®w¦s
¨Ò¦p§ì2330¥x¿n¹q
¨Ã¥Î¹ï¸Ü®ØÅã¥Ü§ì¨ìªº¸ê®Æ
¦ý¹ï¸Ü®Ø¸õ¥X¨Ó«o¬Ý¤£¨ìªÑÅv¤À´²ªí
¥u¦³µ{¦¡§@ªÌ¡Bµ{¦¡¤é´Á¡Bªí³æ½s¸¹µ¥¸ê®Æ
¬O¤£¬O§ÚþÓ¦a¤è·d¿ù¤F
½Ð°ª¤â«üÂI¤@¤U
·P®¦
µ{¦¡¦p¤U
Sub «ö¶s1_Click()
'Application.ScreenUpdating = False ' Ãö³¬¿Ã¹õ§ó·s¡A¥[§Ö³t«×¡C
Dim path As String, thePOSTdata, URL
Dim StockNo As Integer
StockNo = 2330 '§ì2330¥x¿n¹q
d = 20160401 '¶°«O®w¦s¸ê®Æ¤é´Á
URL = "https://www.tdcc.com.tw/smWeb/QryStock.jsp"
Set XML = CreateObject("Microsoft.XMLHTTP")
Set Stream = CreateObject("ADODB.stream")
thePOSTdata = "SCA_DATE=" & d & "SqlMethod=StockNo&StockNo=" & StockNo
XML.Open "POST", URL, 0
XML.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
XML.send thePOSTdata
With Stream
.Type = 1
.Mode = 3
.Open
.Write XML.responseBody
.Position = 0
.Type = 2
.Charset = "Big5"
ByteToText = .ReadText
MsgBox ByteToText
End With
End Sub |
|