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

[µo°Ý] ½Ð°Ý¦p¦ó§â¶W³sµ²Åܦ¨VBA«ü¥O

[µo°Ý] ½Ð°Ý¦p¦ó§â¶W³sµ²Åܦ¨VBA«ü¥O

ºô¸ô²°T¦³´£¨ÑAPIªº¨Ï¥Î¤è¦¡
A1 = http://www.smsgo.com.tw/sms_gw/sendsms.asp?username=±b¸¹&password=±K½X&dstaddr=¤â¾÷¸¹½X,"&encoding=BIG5,&smbody=²°T¤º®e
§Ú´N¥Îexcel§â§Ú­n¶ÇªºÂ²°T¸ê®Æ°µ¦¨¥H¤W³o¦æ¤å¦r
B2 = =HYPERLINK(A1,"²°T")

³o¼Ë§Ú´N§¹¦¨¤F¤@­Ó¶W³sµ²¡A¥u­n·Æ¹«ÂI¤@¤U´N·|§â§Ú­nµoªºÂ²°Tµo¥X¥h
¥i¬O·í¦³«Ü¦h³sµ²ªº®É­Ô¤@ª½¥Î·Æ¹«ÂI«Ü³Â·Ð

½Ð°Ý¦U¦ì¥ý¶i¡A¦p¦ó¥ÎVBAªº»yªk¹F¨ì°e¥Xhttpªº«ü¥O¡A¦pªG¦³10³q²°T­nµo§Ú´N¼g¤@­Ó°j°é¤@¦¸µo§¹

  1.         Set objHTTP = CreateObject("MSXML2.ServerXMLHTTP")
  2.         URL = "http://www.smsgo.com.tw/sms_gw/sendsms.asp?username=" & ±b¸¹ & _
  3.                 "&password=" & ±K½X & "&dstaddr=" & ¤â¾÷¸¹½X & "&encoding=BIG5&smbody=" & ²°T¤º®e
  4.         objHTTP.Open "POST", URL, False
  5.         objHTTP.setRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
  6.         objHTTP.send ("")
½Æ»s¥N½X
À´±oµo°Ý,µª®×´N·|¦b¨ä¤¤

¤µ¤éの¤@¬íは  ©ú¤éにない
http://kimbalko-chi.blogspot.com
http://kimbalko.blogspot.com

TOP

kimbal µoªí©ó 2010-8-6 22:27



·PÁÂK¤jªº¦^µª
·Q½Ð°ÝURL¸Ì­±ªº¤º®e¥i¥H¥Îcell.value¥h¥N¤J¶Ü?
¬Oª½±µ¥´¶i¥h´N¦nÁÙ¬O­n«ç»ò³]?

TOP

¦p¤U­±ÀY4¥y
§â±b¸¹,±K½X,¤â¾÷¸¹½X,²°T¤º®e¤À§O¿é¤Ja1,a2,a3,a4
  1. ±b¸¹ = [A1]
  2. ±K½X = [A2]
  3. ¤â¾÷¸¹½X=[A3]
  4. ²°T¤º®e=[A4]
  5.         Set objHTTP = CreateObject("MSXML2.ServerXMLHTTP")
  6.         URL = "http://www.smsgo.com.tw/sms_gw/sendsms.asp?username=" & ±b¸¹ & _
  7.                 "&password=" & ±K½X & "&dstaddr=" & ¤â¾÷¸¹½X & "&encoding=BIG5&smbody=" & ²°T¤º®e
  8.         objHTTP.Open "POST", URL, False
  9.         objHTTP.setRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
  10.         objHTTP.send ("")
½Æ»s¥N½X
¬Ý¨Ó§A¬Ovba·s¤â~
³o­Óºô¯¸¥i¥H¾Ç²ß¤@¤U¦p¦ó¥Îvba
http://yuan.yocjh.kh.edu.tw/%B1%D0%A7%F7/vba/index.htm
À´±oµo°Ý,µª®×´N·|¦b¨ä¤¤

¤µ¤éの¤@¬íは  ©ú¤éにない
http://kimbalko-chi.blogspot.com
http://kimbalko.blogspot.com

TOP

Sub SMSGO()

    Set objHTTP = CreateObject("MSXML2.ServerXMLHTTP")
    URL = "http://www.smsgo.com.tw/sms_gw/sendsms.asp?username=*****&password=*****&dstaddr=" & Cell(S5).Value & "&encoding=BIG5&smbody=" & Cell(U5).Value
    objHTTP.Open "POST", URL, False
    objHTTP.setRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
    objHTTP.send ("")

End Sub

§Ú§â±zªº¼gªk¼g¨ì¼Ò²Õ¸Ì­±
¥i¬OF5´ú¸Õªº®É­Ô¥L¼g"½sĶ¿ù»~" "¨S¦³©w¸q³o­ÓSub©ÎFunction"
§Ú¦³­þ¸Ì¼g¿ù¶Ü?

TOP

·d©w¤F~·|µo¥X²°T¤F
§Ú¦Aªi¤@¦¸§Úªºµ{¦¡½X

Sub smsgo()

    Set objHTTP = CreateObject("MSXML2.ServerXMLHTTP")
    Dim URL As String
    URL = Range("V5").Value
    objHTTP.Open "POST", URL, False
    objHTTP.setRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
    objHTTP.send ("")

End Sub

§Ú¥ÎExcelªº¨ç¦¡§âhttp«á­±¾ã¦ê¾ã²z¦bV5³o­ÓÄæ¦ì
¥i¬O°e¥X«á¨ì§Úªº¤â¾÷¤@¬Ý©Ò¦³ªº¤¤¤å¦r³£Åܦ¨¶Ã½X¤F¡A½Ð°Ý³o¬O¬Æ»ò­ì¦]?

TOP

        ÀR«ä¦Û¦b : ¦³¤ß´N¦³ºÖ¡A¦³Ä@´N¦³¤O¡A¦Û³yºÖ¥Ð¡A¦Û±oºÖ½t¡C
ªð¦^¦Cªí ¤W¤@¥DÃD