CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: code help

  1. #1
    Join Date
    May 2001
    Posts
    3

    code help

    The following code all gets me to the same point...Which would be the best way to go from a macro in excel so I can then save the opened web page as a text file ? How would the code look if it were to use the IE menu option "File, Save as, Text file. ? Tkx

    ****************************************
    '#1
    Set IE = New SHDocVw.InternetExplorer
    IE.Visible = True
    IE.navigate "http://www.barchart.com"
    '#2
    Set IE = CreateObject("InternetExplorer.application")
    IE.Visible = True
    IE.navigate "http://www.barchart.com"
    '#3
    ActiveWorkbook.FollowHyperlink Address:="http://www.barchart.com/", _
    NewWindow:=False, AddHistory:=False
    ****************************************


  2. #2
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: code help

    Add the Microsoft Internet Transfer control
    then write this code

    set strvar=inet1.openurl("http://ipaddress/virtual directory /filename

    or

    strvar=inet1.openurl("c:/path.../filename")

    the strvar will contain the contents of the web page..!



    Iouri Boutchkine
    [email protected]
    Iouri Boutchkine
    [email protected]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured