LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default User Agent to get source code

Hi,
I found this code on this group forum.

but I have problem, I just do not want to pull source code.

I want to pull source code by setting User Agent.

Is there a way to get source code by changing User Agent to like iPhone or iPad?

Thanks

Sub Tester()
Range("B2").Value = GetSource("http://www.google.com")
End Sub


Function GetSource(sURL As String) As String

Dim oXHTTP As Object

Set oXHTTP = CreateObject("MSXML2.XMLHTTP")
oXHTTP.Open "GET", sURL, False
oXHTTP.send
GetSource = oXHTTP.responsetext
Set oXHTTP = Nothing

End Function
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Retreive data for same agent 818jaime Excel Worksheet Functions 3 May 22nd 12 03:49 PM
How do I obtain Microsoft Agent 2.0 or later? Lawrence the poet Excel Discussion (Misc queries) 1 July 26th 09 12:36 AM
prompt user to change source of links Bobak Excel Discussion (Misc queries) 4 March 20th 06 07:29 PM
VB Code Source knowtrump[_3_] Excel Programming 8 January 19th 06 10:37 PM
user form to copy and paste from source to destination rbekka33 Excel Programming 2 September 13th 04 05:01 AM


All times are GMT +1. The time now is 05:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"