Sub Search_Yahoo()
Dim objIE As Object 'IEオブジェクト参照用
Dim myWord As String
'IEのオブジェクトを作る
If Len(ActiveCell.Value) = 0 Then
Exit Sub
End If
myWord = funct_URL_Encode(CStr(ActiveCell.Value))
Set objIE = CreateObject("InternetExplorer.application")
objIE.Visible = True
objIE.Navigate "http://search.yahoo.co.jp/search?p
=" & myWord & "&aq=-1&oq=&ei=UTF-8&fr=top_of3_sa&x=wrt"
Set objIE = Nothing
End Sub
Sub Search_YahooMap()
Dim objIE As Object 'IEオブジェクト参照用
Dim myWord As String
'IEのオブジェクトを作る
If Len(ActiveCell.Value) = 0 Then
Exit Sub
End If
myWord = funct_URL_Encode(CStr(ActiveCell.Value))
Set objIE = CreateObject("InternetExplorer.application")
objIE.Visible = True
objIE.Navigate "http://maps.loco.yahoo.co.jp/maps?p
=" & myWord & "&ei=utf-8"
Set objIE = Nothing
End Sub
Function funct_URL_Encode(BasicCharactor As String) As String
Dim objScript As Object
Dim objJAVASC As Object
Set objScript = CreateObject("ScriptControl")
objScript.Language = "Jscript"
Set objJAVASC = objScript.CodeObject
funct_URL_Encode = objJAVASC.encodeURIComponent(BasicCharactor)
Set objScript = Nothing
Set objJAVASC = Nothing
End Function
