Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Find and use Open Browser

Hello all,
I have a macro that opens internet explorer and directs the browser to an
internet-based reference set using data I selected on my worksheet as the
search criteria. The sub ends when that is complete, leaving the screen on
the brower. At that point, I usually read the reference material, then go
back to my worksheet, and continue working without closing the brower. Next
time I need to use my macro to start a new search, sub will open a NEW
browser and start the process again, leaving two windows with Internet
explorer open with two different search results. Although this is "okay" I
would really love it if the macro would find the original browser it opened
and use it to start a new search. Is this possible? Below is the portion of
my current code to accomplish what I described above. (The error is in case
I don't have an internet connection and the sub goes to a "plan b".
********
CurrentBook = ActiveWorkbook.Name
ActiveCell.Name = "ClassCode"
Dim ipf As Object

Set ie = CreateObject("InternetExplorer.Application")
With ie
.Visible = True
.Navigate ("http://intranet address/page.html")
' Loop until the page is fully loaded
Do Until .ReadyState = 4
DoEvents
Loop
On Error GoTo error1
Set ipf = ie.document.form1("text1")
ipf.Value = Range("DATATOSEARCH").Value
ie.document.all.Item("Submit1").Click
Exit Sub
End With

error1:
Dim CCode As New DataObject
Dim MyAppID
ie.Application.Quit

********

Any help on this would be awesome! I'm a VBA newbie, and most of what I
have learned has been from this site, borrowing code the tweaking it with
lots of trial and error! Bottom line: Don't assume that I know anything!
Thanks in advance for your help!
Tom

Reply
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
Open Excel not in a browser JS82 Excel Discussion (Misc queries) 1 March 30th 07 02:42 PM
excel can not open on some IE browser Faiz Excel Discussion (Misc queries) 3 July 20th 06 01:29 PM
VBA to open in different browser obsessive Excel Programming 2 May 6th 06 03:21 AM
Open Browser Maximized Stephen Newman Excel Programming 4 April 17th 06 11:54 PM
Open Hyperlinks at the same browser p_uriel Excel Worksheet Functions 0 December 25th 05 10:57 AM


All times are GMT +1. The time now is 08:53 PM.

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"