+ Reply to Thread
Results 1 to 10 of 10

GetObject Equivalent for Internet Explorer?

  1. #1
    spaceman
    Guest

    GetObject Equivalent for Internet Explorer?

    Is there anyway/alternative method of using GetObject for Internet Explorer?

    Is there a workaround for GetObject? I saw some things yesterday but it
    seemed to involve downloading something, which doesn't work for me at work
    (we're not supposed to use downloaded things etc). And IE doesn't add
    itself to the existing applications listing (or whatever it's called) like
    programs that are associated to file extensions - excel, word, adobe etc.

    Basically, I want to target an existing IE window, the name of it will be
    unique, and then from there, either copy the contents of that web page into
    a cell, or be able to target a textbox on that page called xxfundsxx (for
    example) to return the contents of that textbox into a variable.

    Navigating to the page and then getting the data (which I can do, but is not
    possible in this situation) won't work due to it being an IE based
    application that is always the same web page, but it extracts data for
    different accounts etc when it is opened. Has to be from an existing window.

    Cheers.




  2. #2
    Bob Phillips
    Guest

    Re: GetObject Equivalent for Internet Explorer?

    Not sure I get the question, but have you tried

    getobject(,"InternetExplorer.Application")

    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "spaceman" <space_man_33@hotmail.com> wrote in message
    news:dnpn4s$e5t$2@nwrdmz02.dmz.ncs.ea.ibs-infra.bt.com...
    > Is there anyway/alternative method of using GetObject for Internet

    Explorer?
    >
    > Is there a workaround for GetObject? I saw some things yesterday but it
    > seemed to involve downloading something, which doesn't work for me at work
    > (we're not supposed to use downloaded things etc). And IE doesn't add
    > itself to the existing applications listing (or whatever it's called) like
    > programs that are associated to file extensions - excel, word, adobe etc.
    >
    > Basically, I want to target an existing IE window, the name of it will be
    > unique, and then from there, either copy the contents of that web page

    into
    > a cell, or be able to target a textbox on that page called xxfundsxx (for
    > example) to return the contents of that textbox into a variable.
    >
    > Navigating to the page and then getting the data (which I can do, but is

    not
    > possible in this situation) won't work due to it being an IE based
    > application that is always the same web page, but it extracts data for
    > different accounts etc when it is opened. Has to be from an existing

    window.
    >
    > Cheers.
    >
    >
    >




  3. #3
    spaceman
    Guest

    Re: GetObject Equivalent for Internet Explorer?

    Yes, but because Internet Explorer doesn't have any program associations
    like .xls (has .url, .htm, but they aren't programs) getobject won't work.

    Scenario.

    I have an IE window open. I want to grab a value from a textbox in that
    window from Excel. The window title will always be unique, so that is how I
    will be identifying the window, I presume.

    I either want to grab a value in a textbox, or copy the contents of the web
    page into a cell.

    Using createobject and navigating to the URL is not an option.

    Cheers.
    "Bob Phillips" <bob.phillips@notheretiscali.co.uk> wrote in message
    news:eW63yPOAGHA.2132@TK2MSFTNGP14.phx.gbl...
    > Not sure I get the question, but have you tried
    >
    > getobject(,"InternetExplorer.Application")
    >
    > --
    > HTH
    >
    > Bob Phillips
    >
    > (remove nothere from email address if mailing direct)
    >
    > "spaceman" <space_man_33@hotmail.com> wrote in message
    > news:dnpn4s$e5t$2@nwrdmz02.dmz.ncs.ea.ibs-infra.bt.com...
    >> Is there anyway/alternative method of using GetObject for Internet

    > Explorer?
    >>
    >> Is there a workaround for GetObject? I saw some things yesterday but it
    >> seemed to involve downloading something, which doesn't work for me at
    >> work
    >> (we're not supposed to use downloaded things etc). And IE doesn't add
    >> itself to the existing applications listing (or whatever it's called)
    >> like
    >> programs that are associated to file extensions - excel, word, adobe etc.
    >>
    >> Basically, I want to target an existing IE window, the name of it will be
    >> unique, and then from there, either copy the contents of that web page

    > into
    >> a cell, or be able to target a textbox on that page called xxfundsxx (for
    >> example) to return the contents of that textbox into a variable.
    >>
    >> Navigating to the page and then getting the data (which I can do, but is

    > not
    >> possible in this situation) won't work due to it being an IE based
    >> application that is always the same web page, but it extracts data for
    >> different accounts etc when it is opened. Has to be from an existing

    > window.
    >>
    >> Cheers.
    >>
    >>
    >>

    >
    >
    >





  4. #4
    Jake Marx
    Guest

    Re: GetObject Equivalent for Internet Explorer?

    Hi spaceman,

    spaceman wrote:
    > I have an IE window open. I want to grab a value from a textbox in
    > that window from Excel. The window title will always be unique, so
    > that is how I will be identifying the window, I presume.
    >
    > I either want to grab a value in a textbox, or copy the contents of
    > the web page into a cell.
    >
    > Using createobject and navigating to the URL is not an option.


    There is no straightforward way to do this AFAIK. If you were able to use
    CreateObject, you could do it easily. If the window is already open, you'll
    probably have to use the API. I'm not sure about getting the value of a
    particular textbox housed by that window, but I suppose it's possible.
    Here's an example of how to get the URL of all active IE windows:

    http://www.mvps.org/access/api/api0051.htm

    --
    Regards,

    Jake Marx
    www.longhead.com


    [please keep replies in the newsgroup - email address unmonitored]



  5. #5
    quartz
    Guest

    RE: GetObject Equivalent for Internet Explorer?

    Sorry, I misread your first post. You could try:

    Sub test2()

    Dim iNet As Object
    Dim sURL As String
    sURL =
    "http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.excel.programming&lang=en&cr=US"
    Set iNet = GetObject(, "InternetExplorer.Application")
    iNet.Visible = True
    iNet.Navigate sURL
    End Sub

    But, the above often generates an error. Failing this, would it work to just
    open the page in Excel as in:

    Workbooks.Open ("http://myURL")

    "quartz" wrote:

    > Hi, this may help a little bit...
    >
    > The following will load a new instance of IE and navigate to this web site:
    >
    > Sub test()
    >
    > Dim iNet As Object
    > Dim sURL As String
    > sURL =
    > "http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.excel.programming&lang=en&cr=US"
    > Set iNet = CreateObject("InternetExplorer.Application")
    > iNet.Visible = True
    > iNet.Navigate sURL
    > End Sub
    >
    > HTH/
    >
    > "spaceman" wrote:
    >
    > > Is there anyway/alternative method of using GetObject for Internet Explorer?
    > >
    > > Is there a workaround for GetObject? I saw some things yesterday but it
    > > seemed to involve downloading something, which doesn't work for me at work
    > > (we're not supposed to use downloaded things etc). And IE doesn't add
    > > itself to the existing applications listing (or whatever it's called) like
    > > programs that are associated to file extensions - excel, word, adobe etc.
    > >
    > > Basically, I want to target an existing IE window, the name of it will be
    > > unique, and then from there, either copy the contents of that web page into
    > > a cell, or be able to target a textbox on that page called xxfundsxx (for
    > > example) to return the contents of that textbox into a variable.
    > >
    > > Navigating to the page and then getting the data (which I can do, but is not
    > > possible in this situation) won't work due to it being an IE based
    > > application that is always the same web page, but it extracts data for
    > > different accounts etc when it is opened. Has to be from an existing window.
    > >
    > > Cheers.
    > >
    > >
    > >
    > >


  6. #6
    quartz
    Guest

    RE: GetObject Equivalent for Internet Explorer?

    Hi, this may help a little bit...

    The following will load a new instance of IE and navigate to this web site:

    Sub test()

    Dim iNet As Object
    Dim sURL As String
    sURL =
    "http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.excel.programming&lang=en&cr=US"
    Set iNet = CreateObject("InternetExplorer.Application")
    iNet.Visible = True
    iNet.Navigate sURL
    End Sub

    HTH/

    "spaceman" wrote:

    > Is there anyway/alternative method of using GetObject for Internet Explorer?
    >
    > Is there a workaround for GetObject? I saw some things yesterday but it
    > seemed to involve downloading something, which doesn't work for me at work
    > (we're not supposed to use downloaded things etc). And IE doesn't add
    > itself to the existing applications listing (or whatever it's called) like
    > programs that are associated to file extensions - excel, word, adobe etc.
    >
    > Basically, I want to target an existing IE window, the name of it will be
    > unique, and then from there, either copy the contents of that web page into
    > a cell, or be able to target a textbox on that page called xxfundsxx (for
    > example) to return the contents of that textbox into a variable.
    >
    > Navigating to the page and then getting the data (which I can do, but is not
    > possible in this situation) won't work due to it being an IE based
    > application that is always the same web page, but it extracts data for
    > different accounts etc when it is opened. Has to be from an existing window.
    >
    > Cheers.
    >
    >
    >
    >


  7. #7
    spaceman
    Guest

    Re: GetObject Equivalent for Internet Explorer?

    Thanks for the thoughts, but no

    A web page is opened, and an account number is entered. We press tab and
    the relevant account screen opens. The URL is always the same for all
    accounts, so I can't navigate to the web page. It has to be by using an
    existing window.

    I've seen posts on getting data from other applications, but IE is
    different.

    If I could navigate to the web page I could do it in a sinch, as I've done
    that before, but createobject is no help here.

    "quartz" <quartz@discussions.microsoft.com> wrote in message
    news:D7E3EDE8-DFE8-42EA-B37A-58888320C798@microsoft.com...
    > Sorry, I misread your first post. You could try:
    >
    > Sub test2()
    >
    > Dim iNet As Object
    > Dim sURL As String
    > sURL =
    > "http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.excel.programming&lang=en&cr=US"
    > Set iNet = GetObject(, "InternetExplorer.Application")
    > iNet.Visible = True
    > iNet.Navigate sURL
    > End Sub
    >
    > But, the above often generates an error. Failing this, would it work to
    > just
    > open the page in Excel as in:
    >
    > Workbooks.Open ("http://myURL")
    >
    > "quartz" wrote:
    >
    >> Hi, this may help a little bit...
    >>
    >> The following will load a new instance of IE and navigate to this web
    >> site:
    >>
    >> Sub test()
    >>
    >> Dim iNet As Object
    >> Dim sURL As String
    >> sURL =
    >> "http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.excel.programming&lang=en&cr=US"
    >> Set iNet = CreateObject("InternetExplorer.Application")
    >> iNet.Visible = True
    >> iNet.Navigate sURL
    >> End Sub
    >>
    >> HTH/
    >>
    >> "spaceman" wrote:
    >>
    >> > Is there anyway/alternative method of using GetObject for Internet
    >> > Explorer?
    >> >
    >> > Is there a workaround for GetObject? I saw some things yesterday but it
    >> > seemed to involve downloading something, which doesn't work for me at
    >> > work
    >> > (we're not supposed to use downloaded things etc). And IE doesn't add
    >> > itself to the existing applications listing (or whatever it's called)
    >> > like
    >> > programs that are associated to file extensions - excel, word, adobe
    >> > etc.
    >> >
    >> > Basically, I want to target an existing IE window, the name of it will
    >> > be
    >> > unique, and then from there, either copy the contents of that web page
    >> > into
    >> > a cell, or be able to target a textbox on that page called xxfundsxx
    >> > (for
    >> > example) to return the contents of that textbox into a variable.
    >> >
    >> > Navigating to the page and then getting the data (which I can do, but
    >> > is not
    >> > possible in this situation) won't work due to it being an IE based
    >> > application that is always the same web page, but it extracts data for
    >> > different accounts etc when it is opened. Has to be from an existing
    >> > window.
    >> >
    >> > Cheers.
    >> >
    >> >
    >> >
    >> >

    >





  8. #8
    Tim Williams
    Guest

    Re: GetObject Equivalent for Internet Explorer?

    'Find an IE window with matching location and get a reference
    ' to the document object from the loaded page. Assumes no frames.
    Function GetHTMLDocument(sAddress As String) As Object

    Dim objShell As Object, objShellWindows As Object, o As Object
    Dim retVal As Object, sURL As String


    Set retVal = Nothing
    Set objShell = CreateObject("Shell.Applicatio*n")
    Set objShellWindows = objShell.Windows


    'see if IE is already open
    For Each o In objShellWindows
    sURL = ""
    On Error Resume Next
    sURL = o.Document.Location
    On Error GoTo 0
    If sURL <> "" Then
    If sURL Like sAddress & "*" Then
    Set retVal = o.Document
    Exit For
    End If
    End If
    Next o


    Set GetHTMLDocument = retVal
    End Function


    Tim



    "spaceman" <space_man_33@hotmail.com> wrote in message
    news:dnr1dl$dv1$1@nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com...
    > Thanks for the thoughts, but no
    >
    > A web page is opened, and an account number is entered. We press
    > tab and the relevant account screen opens. The URL is always the
    > same for all accounts, so I can't navigate to the web page. It has
    > to be by using an existing window.
    >
    > I've seen posts on getting data from other applications, but IE is
    > different.
    >
    > If I could navigate to the web page I could do it in a sinch, as
    > I've done that before, but createobject is no help here.
    >
    > "quartz" <quartz@discussions.microsoft.com> wrote in message
    > news:D7E3EDE8-DFE8-42EA-B37A-58888320C798@microsoft.com...
    >> Sorry, I misread your first post. You could try:
    >>
    >> Sub test2()
    >>
    >> Dim iNet As Object
    >> Dim sURL As String
    >> sURL =
    >> "http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.excel.programming&lang=en&cr=US"
    >> Set iNet = GetObject(, "InternetExplorer.Application")
    >> iNet.Visible = True
    >> iNet.Navigate sURL
    >> End Sub
    >>
    >> But, the above often generates an error. Failing this, would it
    >> work to just
    >> open the page in Excel as in:
    >>
    >> Workbooks.Open ("http://myURL")
    >>
    >> "quartz" wrote:
    >>
    >>> Hi, this may help a little bit...
    >>>
    >>> The following will load a new instance of IE and navigate to this
    >>> web site:
    >>>
    >>> Sub test()
    >>>
    >>> Dim iNet As Object
    >>> Dim sURL As String
    >>> sURL =
    >>> "http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.excel.programming&lang=en&cr=US"
    >>> Set iNet = CreateObject("InternetExplorer.Application")
    >>> iNet.Visible = True
    >>> iNet.Navigate sURL
    >>> End Sub
    >>>
    >>> HTH/
    >>>
    >>> "spaceman" wrote:
    >>>
    >>> > Is there anyway/alternative method of using GetObject for
    >>> > Internet Explorer?
    >>> >
    >>> > Is there a workaround for GetObject? I saw some things yesterday
    >>> > but it
    >>> > seemed to involve downloading something, which doesn't work for
    >>> > me at work
    >>> > (we're not supposed to use downloaded things etc). And IE
    >>> > doesn't add
    >>> > itself to the existing applications listing (or whatever it's
    >>> > called) like
    >>> > programs that are associated to file extensions - excel, word,
    >>> > adobe etc.
    >>> >
    >>> > Basically, I want to target an existing IE window, the name of
    >>> > it will be
    >>> > unique, and then from there, either copy the contents of that
    >>> > web page into
    >>> > a cell, or be able to target a textbox on that page called
    >>> > xxfundsxx (for
    >>> > example) to return the contents of that textbox into a variable.
    >>> >
    >>> > Navigating to the page and then getting the data (which I can
    >>> > do, but is not
    >>> > possible in this situation) won't work due to it being an IE
    >>> > based
    >>> > application that is always the same web page, but it extracts
    >>> > data for
    >>> > different accounts etc when it is opened. Has to be from an
    >>> > existing window.
    >>> >
    >>> > Cheers.
    >>> >
    >>> >
    >>> >
    >>> >

    >>

    >
    >
    >




  9. #9
    spaceman
    Guest

    Re: GetObject Equivalent for Internet Explorer?

    Thanks Tim.

    Do I use this like below:

    Sub Button4_Click()
    a = GetHTMLDocument("removed")
    b = a.Document.body.innerText
    End Sub

    ??(cos that doesn't work )

    or do I need to set something up first? Not exactly au fait with this side
    of things.

    Cheers.
    "Tim Williams" <saxifrax@pacbell*dot*net> wrote in message
    news:OZ9k6lUAGHA.2392@TK2MSFTNGP09.phx.gbl...
    > 'Find an IE window with matching location and get a reference
    > ' to the document object from the loaded page. Assumes no frames.
    > Function GetHTMLDocument(sAddress As String) As Object
    >
    > Dim objShell As Object, objShellWindows As Object, o As Object
    > Dim retVal As Object, sURL As String
    >
    >
    > Set retVal = Nothing
    > Set objShell = CreateObject("Shell.Applicatio*n")
    > Set objShellWindows = objShell.Windows
    >
    >
    > 'see if IE is already open
    > For Each o In objShellWindows
    > sURL = ""
    > On Error Resume Next
    > sURL = o.Document.Location
    > On Error GoTo 0
    > If sURL <> "" Then
    > If sURL Like sAddress & "*" Then
    > Set retVal = o.Document
    > Exit For
    > End If
    > End If
    > Next o
    >
    >
    > Set GetHTMLDocument = retVal
    > End Function
    >
    >
    > Tim
    >
    >
    >
    > "spaceman" <space_man_33@hotmail.com> wrote in message
    > news:dnr1dl$dv1$1@nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com...
    >> Thanks for the thoughts, but no
    >>
    >> A web page is opened, and an account number is entered. We press tab and
    >> the relevant account screen opens. The URL is always the same for all
    >> accounts, so I can't navigate to the web page. It has to be by using an
    >> existing window.
    >>
    >> I've seen posts on getting data from other applications, but IE is
    >> different.
    >>
    >> If I could navigate to the web page I could do it in a sinch, as I've
    >> done that before, but createobject is no help here.
    >>
    >> "quartz" <quartz@discussions.microsoft.com> wrote in message
    >> news:D7E3EDE8-DFE8-42EA-B37A-58888320C798@microsoft.com...
    >>> Sorry, I misread your first post. You could try:
    >>>
    >>> Sub test2()
    >>>
    >>> Dim iNet As Object
    >>> Dim sURL As String
    >>> sURL =
    >>> "http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.excel.programming&lang=en&cr=US"
    >>> Set iNet = GetObject(, "InternetExplorer.Application")
    >>> iNet.Visible = True
    >>> iNet.Navigate sURL
    >>> End Sub
    >>>
    >>> But, the above often generates an error. Failing this, would it work to
    >>> just
    >>> open the page in Excel as in:
    >>>
    >>> Workbooks.Open ("http://myURL")
    >>>
    >>> "quartz" wrote:
    >>>
    >>>> Hi, this may help a little bit...
    >>>>
    >>>> The following will load a new instance of IE and navigate to this web
    >>>> site:
    >>>>
    >>>> Sub test()
    >>>>
    >>>> Dim iNet As Object
    >>>> Dim sURL As String
    >>>> sURL =
    >>>> "http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.excel.programming&lang=en&cr=US"
    >>>> Set iNet = CreateObject("InternetExplorer.Application")
    >>>> iNet.Visible = True
    >>>> iNet.Navigate sURL
    >>>> End Sub
    >>>>
    >>>> HTH/
    >>>>
    >>>> "spaceman" wrote:
    >>>>
    >>>> > Is there anyway/alternative method of using GetObject for Internet
    >>>> > Explorer?
    >>>> >
    >>>> > Is there a workaround for GetObject? I saw some things yesterday but
    >>>> > it
    >>>> > seemed to involve downloading something, which doesn't work for me at
    >>>> > work
    >>>> > (we're not supposed to use downloaded things etc). And IE doesn't
    >>>> > add
    >>>> > itself to the existing applications listing (or whatever it's called)
    >>>> > like
    >>>> > programs that are associated to file extensions - excel, word, adobe
    >>>> > etc.
    >>>> >
    >>>> > Basically, I want to target an existing IE window, the name of it
    >>>> > will be
    >>>> > unique, and then from there, either copy the contents of that web
    >>>> > page into
    >>>> > a cell, or be able to target a textbox on that page called xxfundsxx
    >>>> > (for
    >>>> > example) to return the contents of that textbox into a variable.
    >>>> >
    >>>> > Navigating to the page and then getting the data (which I can do, but
    >>>> > is not
    >>>> > possible in this situation) won't work due to it being an IE based
    >>>> > application that is always the same web page, but it extracts data
    >>>> > for
    >>>> > different accounts etc when it is opened. Has to be from an existing
    >>>> > window.
    >>>> >
    >>>> > Cheers.
    >>>> >
    >>>> >
    >>>> >
    >>>> >
    >>>

    >>
    >>
    >>

    >
    >
    >





  10. #10
    Tim Williams
    Guest

    Re: GetObject Equivalent for Internet Explorer?

    The function returns a reference to the HTML document from the first IE
    instance with an open page whose URL matches (begins with) the one passed to
    the function.

    Once you have the document reference then everything on the page should be
    accessible via the HTML Document Object Model.

    Eg: assuming your textbox actually has an "id" of "xxfundsxx".
    '************************************************
    dim a as object
    dim b as string

    set a=GetHTMLDocument("http://www.someserver.com/somepage.asp")

    Msgbox a.getElementById("xxfundsxx").value
    '************************************************


    Tim



    --
    Tim Williams
    Palo Alto, CA


    "spaceman" <space_man_33@hotmail.com> wrote in message
    news:dnrs8n$n2q$1@nwrdmz03.dmz.ncs.ea.ibs-infra.bt.com...
    > Thanks Tim.
    >
    > Do I use this like below:
    >
    > Sub Button4_Click()
    > a = GetHTMLDocument("removed")
    > b = a.Document.body.innerText
    > End Sub
    >
    > ??(cos that doesn't work )
    >
    > or do I need to set something up first? Not exactly au fait with this

    side
    > of things.
    >
    > Cheers.
    > "Tim Williams" <saxifrax@pacbell*dot*net> wrote in message
    > news:OZ9k6lUAGHA.2392@TK2MSFTNGP09.phx.gbl...
    > > 'Find an IE window with matching location and get a reference
    > > ' to the document object from the loaded page. Assumes no frames.
    > > Function GetHTMLDocument(sAddress As String) As Object
    > >
    > > Dim objShell As Object, objShellWindows As Object, o As Object
    > > Dim retVal As Object, sURL As String
    > >
    > >
    > > Set retVal = Nothing
    > > Set objShell = CreateObject("Shell.Applicatio*n")
    > > Set objShellWindows = objShell.Windows
    > >
    > >
    > > 'see if IE is already open
    > > For Each o In objShellWindows
    > > sURL = ""
    > > On Error Resume Next
    > > sURL = o.Document.Location
    > > On Error GoTo 0
    > > If sURL <> "" Then
    > > If sURL Like sAddress & "*" Then
    > > Set retVal = o.Document
    > > Exit For
    > > End If
    > > End If
    > > Next o
    > >
    > >
    > > Set GetHTMLDocument = retVal
    > > End Function
    > >
    > >
    > > Tim
    > >
    > >
    > >
    > > "spaceman" <space_man_33@hotmail.com> wrote in message
    > > news:dnr1dl$dv1$1@nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com...
    > >> Thanks for the thoughts, but no
    > >>
    > >> A web page is opened, and an account number is entered. We press tab

    and
    > >> the relevant account screen opens. The URL is always the same for all
    > >> accounts, so I can't navigate to the web page. It has to be by using

    an
    > >> existing window.
    > >>
    > >> I've seen posts on getting data from other applications, but IE is
    > >> different.
    > >>
    > >> If I could navigate to the web page I could do it in a sinch, as I've
    > >> done that before, but createobject is no help here.
    > >>
    > >> "quartz" <quartz@discussions.microsoft.com> wrote in message
    > >> news:D7E3EDE8-DFE8-42EA-B37A-58888320C798@microsoft.com...
    > >>> Sorry, I misread your first post. You could try:
    > >>>
    > >>> Sub test2()
    > >>>
    > >>> Dim iNet As Object
    > >>> Dim sURL As String
    > >>> sURL =
    > >>>

    "http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.excel
    ..programming&lang=en&cr=US"
    > >>> Set iNet = GetObject(, "InternetExplorer.Application")
    > >>> iNet.Visible = True
    > >>> iNet.Navigate sURL
    > >>> End Sub
    > >>>
    > >>> But, the above often generates an error. Failing this, would it work

    to
    > >>> just
    > >>> open the page in Excel as in:
    > >>>
    > >>> Workbooks.Open ("http://myURL")
    > >>>
    > >>> "quartz" wrote:
    > >>>
    > >>>> Hi, this may help a little bit...
    > >>>>
    > >>>> The following will load a new instance of IE and navigate to this web
    > >>>> site:
    > >>>>
    > >>>> Sub test()
    > >>>>
    > >>>> Dim iNet As Object
    > >>>> Dim sURL As String
    > >>>> sURL =
    > >>>>

    "http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.excel
    ..programming&lang=en&cr=US"
    > >>>> Set iNet = CreateObject("InternetExplorer.Application")
    > >>>> iNet.Visible = True
    > >>>> iNet.Navigate sURL
    > >>>> End Sub
    > >>>>
    > >>>> HTH/
    > >>>>
    > >>>> "spaceman" wrote:
    > >>>>
    > >>>> > Is there anyway/alternative method of using GetObject for Internet
    > >>>> > Explorer?
    > >>>> >
    > >>>> > Is there a workaround for GetObject? I saw some things yesterday

    but
    > >>>> > it
    > >>>> > seemed to involve downloading something, which doesn't work for me

    at
    > >>>> > work
    > >>>> > (we're not supposed to use downloaded things etc). And IE doesn't
    > >>>> > add
    > >>>> > itself to the existing applications listing (or whatever it's

    called)
    > >>>> > like
    > >>>> > programs that are associated to file extensions - excel, word,

    adobe
    > >>>> > etc.
    > >>>> >
    > >>>> > Basically, I want to target an existing IE window, the name of it
    > >>>> > will be
    > >>>> > unique, and then from there, either copy the contents of that web
    > >>>> > page into
    > >>>> > a cell, or be able to target a textbox on that page called

    xxfundsxx
    > >>>> > (for
    > >>>> > example) to return the contents of that textbox into a variable.
    > >>>> >
    > >>>> > Navigating to the page and then getting the data (which I can do,

    but
    > >>>> > is not
    > >>>> > possible in this situation) won't work due to it being an IE based
    > >>>> > application that is always the same web page, but it extracts data
    > >>>> > for
    > >>>> > different accounts etc when it is opened. Has to be from an

    existing
    > >>>> > window.
    > >>>> >
    > >>>> > Cheers.
    > >>>> >
    > >>>> >
    > >>>> >
    > >>>> >
    > >>>
    > >>
    > >>
    > >>

    > >
    > >
    > >

    >
    >
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1