- ©«¤l
- 2035
- ¥DÃD
- 24
- ºëµØ
- 0
- ¿n¤À
- 2031
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-3-22
- ³Ì«áµn¿ý
- 2024-2-1
|
¥»©«³Ì«á¥Ñ c_c_lai ©ó 2016-1-26 13:41 ½s¿è
¦^´_ 1# ¦Û§Ú·Pı¨}¦n
¦^´_ 2# Hsieh
¦^´_ 6# GBKEE - Option Explicit
- Sub searchIT(Rng As Range)
- Dim XH As Object
- Dim shpRm As Shape
-
- ' ²M°£¤w¦³ªº¸ÑÄÀ¤Îµ¼Ð
- With Rng.EntireRow
- .Resize(1, .Columns.Count - 1).Offset(0, 1).Clear
- End With
-
- ' ¶}±Òºô¶
- Set XH = CreateObject("Microsoft.XMLHTTP")
- With XH
- .Open "get", "http://tw.dictionary.search.yahoo.com/search?p=" & Rng.Text, False
- .send
- On Error Resume Next
- ' ºK¨ú²Ä¤@²Õ¤¤¤å½Ķ
- ' Rng.Offset(0, 2) = Split(Split(.responseText, "class=""description""><p>1.")(1), "<")(0)
- If InStr(.responseText, "><h4>1.") > 0 Then Rng.Offset(0, 2) = Trim(Split(Split(.responseText, "><h4>1.")(1), "<")(0))
- ' ºK¨úKKµ¼Ð
- ' Rng.Offset(0, 1) = Left(VBA.Split(.responseText, "KK</span> ")(1), InStr(VBA.Split(.responseText, "KK</span> ")(1), "]"))
- ' Rng.Offset(0, 1) = Split((Split(.responseText, "KK</span>")(1)), "<span>")(0)
- If InStr(.responseText, ">KK[") > 0 Then Rng.Offset(0, 1) = "[" & Split(Split(.responseText, ">KK[")(1), "]")(0) & "]"
- End With
-
- Rng.Select
- End Sub
- Sub Ex()
- Dim Rng As Range
-
- For Each Rng In ActiveSheet.Range("A1", ActiveSheet.Range("A" & Rows.Count).End(xlUp))
- Rng.Select
- If Rng.Value <> "" Then
- searchIT Rng
- End If
- Next
- End Sub
½Æ»s¥N½X |
-
-
E.png
(18.87 KB)
-
-
E.png
(18.87 KB)
|