Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IE Object properties are missing

Status
Not open for further replies.

HairyProgrammer

IS-IT--Management
Dec 21, 2011
1
US
Having trouble with what should be easy, the goal is to launch a browser and navigate to a specific URL, re using the named browser window if present. Problem is that when i go to do the appactivate, (using the wait methods commonly described) they dont work. e.g. while objIE.busy doevents nor does the objIE.readystate. After poking around, I discovered that I am not getting access to all of the properites in the internet explorer object. Some are there, some are not. I havnt done and exhaustive look, but here is what I have found

objie.busy is always 0
Readystate is always null
LocationURL is null
LocationName is null
Name = Windows Internet Explorer
hwnd has the windows handle
FullName shows the program location

The only theory I have come up with is that there is some group policy on this corporate machine blocking the properties, but i have found nothing to confirm it, only hints of the possibility this could be done; i have checked the event log and it shows successful creation of the object, no errors in security nor application;

any insight is greatly appreciated

here is a snipet of the code

dim objIE as object
dim BrowserString


Set objIE = CreateObject("InternetExplorer.Application")

BrowserString = "
' this doesnt work,, objie.busy is always 0, so I cmmented out

' Error resume next
' While objIE.busy
' doevents
' wend

objIE.Visible = True

' ---------------

objIE.Navigate (BrowserString),,("LICB") ' reuse window named LICB if it exists, otherwise open new w name LICB

' tried it here too
' On Error resume next
' While objIE.busy
' doevents
' wend
'

' the recomended approaches do not work , it is never ready (always 0) and loops
' While objIE.readystate < 4 also <> objie.document.readystate <> "complete" and all variations thereof do not work
' doevents
' wend
' also tried putting the wait in a callable subroutine,, behavior is same


' this works just fine, if the user hasnt navigated away from the window,
' i tried putting in a pause on error and appactivate again, but the error doesnt get trapped a second time
' and I get an illegal function call (err=5) ; resetting err doesnt help

On Error goto SkipAppAct
AppActivate "Yahoo! - microsoft internet explorer provided by xyz"

Goto Endit

SkipAppAct:

Msgbox "site did not respond in time; please navigate manually"

Endit:
 



hi,

Are you using an Attachmate screen emulator? I don't see any reference to an Attachmate application.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top