Private Function getDataFromWeb(inUrl As String) As String
' データ取得
Dim httpObj
Set httpObj = CreateObject("Microsoft.XMLHTTP")
httpObj.Open "GET", inUrl, False
httpObj.send
' データ取得結果を確認する
If (httpObj.Status >= 200 And httpObj.Status < 300) Then
getDataFromWeb = httpObj.ResponseText
End If
' 後始末
Set httpObj = Nothing
End Function
' データ取得
Dim httpObj
Set httpObj = CreateObject("Microsoft.XMLHTTP")
httpObj.Open "GET", inUrl, False
httpObj.send
' データ取得結果を確認する
If (httpObj.Status >= 200 And httpObj.Status < 300) Then
getDataFromWeb = httpObj.ResponseText
End If
' 後始末
Set httpObj = Nothing
End Function
0 件のコメント:
コメントを投稿