In message <
[email protected]> of Sun, 3 Jan
2010 14:08:18 in microsoft.public.excel.programming, Chip Pearson
I have a module file that wraps up all the messy Windows API code into
nice neat and easy to use VBA functions. Download, unzip, and import
http://www.cpearson.com/Zips/modRegistry.zip. This will create a
module in your project named modRegistry.
That might allow me to do something I don't know how to do yet.
I find that loading some pages in Internet Explorer takes an
unreasonable time when pictures are involved.
In IE8, one can manually control whether pictures are loaded in future
activations with Tools/Internet Options/Advanced/Show pictures - it is
one of the Multimedia checkboxes.
MY ? I infer that changes a registry entry or entries. Which one(s)?
I want to implement the following pseudo-code
Switch off pictures
Set ie = CreateObject("InternetExplorer.Application") ' start ie
Switch on pictures.
I tried using Procmon to identify the relevant data. There was more
noise than I wanted to wander through.
BTW:
I normally access ie from VBA without opening an ie window.
This can be painful if ie decides to be slow about loading pictures.
I use this code:
Dim Fired As Boolean
....
Private Sub MakeIEVisible()
Fired = True
ie.Visible = True
End Sub
Sub foo()
Dim IEalarm As Date
...
IEalarm = Now + TimeValue("00:00:15")
Fired = False
Application.OnTime IEalarm, "MakeIEVisible"
Set ie = CreateObject("InternetExplorer.Application")
ie.Navigate2 URL1
Do While ie.busy Or ie.ReadyState <> 4: DoEvents: Loop
If Not Fired Then Application.OnTime IEalarm, "MakeIEVisible", schedule:=False
...
End Sub
Either the Internet access takes less than 15 seconds or an IE window is
opened, which allows me to use the "Esc" key to stop ie hanging about,
waiting for pictures I don't care about.
If I break that code in the debugger, IEAlarm is not called and the
schedule=False call fails. That is easily sorted by altering the next
statement to skip that call. There is probably a cleverer way to handle
running code in the debugger. This is clever enough for me.
I could use onerror, but choose not to.