Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Vista has broken my SHDocVW

I have a spreadsheet which I wrote some time ago for checking my
lottery results. The code is shown below and has worked perfectly on
a number of XPSP2 machines for quite some time. I have recently
upgraded my home PC to Vista 64 SP1 and installed my copy Office 2003
on it. Now when I try to run the VBA I get various errors when using
the SHDocVW functions

Sub GetResults()

Dim oIE As SHDocVw.InternetExplorer
Dim sPage As String
Dim SearchStrings As Variant
Dim SearchElements As Integer
Dim sPageLen As Variant
Dim DrawNo As Integer
Dim LatestResults(4) As Variant
Dim j As Variant
Dim i As Integer
Dim k As Integer
Dim NoOfPlayers As Integer
'
StartTime = Now
'
' Routine counts the number of players in the syndicate
'
i = 7 ' First row number with player's name in
k = 2 ' Column number that player's names are in
Do Until IsEmpty(Cells(i, k))
i = i + 1
Loop
'
NoOfPlayers = i - 7 ' Row number with last player's name in
'
Set oIE = New SHDocVw.InternetExplorer
'
' Define the search strings in the web page to get to where the
results start.
'
SearchStrings = Array("Draw History table", "Jackpot", "Prizes", "TD",
_
"<TD", "<TD", "class=redText", "view", "odd", _
"TD")
SearchElements = 10
'
'Range("a1:b20").Clear ' This code was used for development and has
been left for future maintenance
'
oIE.Navigate "http://www.national-lottery.co.uk/player/p/results/
resultsHistory/resultsHistoryAction.do"
'
' A hidden version of IE is started and fetched from the Internet.
' As this takes a few seconds a progress bar is displayed in the
status bar to
' show that something is going on.
'
Do Until oIE.ReadyState = READYSTATE_COMPLETE
DoEvents
j = j + 1
If j Mod 2500 = 0 Then ProgressBar (j) ' Calls progress
routine every 2.5k clicks
Loop
'
The debugger kicks in on the Do Until oIE.ReadyState =
READYSTATE_COMPLETE line. If I set a break point and hover over the
line I get a message saying the data source has been disconnected. In
addition when the oIE.Navigate command executes it actually opens IE7
on the desktop rather than opening a hidden version as it has done in
the past. I have checked the version numbers of the ieframe.dll and
the copy on my Vista machine is newer but I have IE7 on my XP machines
and the code is fine.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 115
Default Vista has broken my SHDocVW

Wild guess here, but I'd put my money on it having to do with Vista's
built-in Big-Brother, er, I mean security features. Firewall or UAC settings,
maybe.

"TimP58" wrote:

I have a spreadsheet which I wrote some time ago for checking my
lottery results. The code is shown below and has worked perfectly on
a number of XPSP2 machines for quite some time. I have recently
upgraded my home PC to Vista 64 SP1 and installed my copy Office 2003
on it. Now when I try to run the VBA I get various errors when using
the SHDocVW functions

<snip

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Vista has broken my SHDocVW

On 24 Apr, 18:41, Lynda wrote:
Wild guess here, but I'd put my money on it having to do with Vista's
built-in Big-Brother, er, I mean security features. Firewall or UAC settings,
maybe.

"TimP58" wrote:
I have a spreadsheet which I wrote some time ago for checking my
lottery results. The code is shown below and has worked perfectly on
a number of XPSP2 machines for quite some time. I have recently
upgraded my home PC to Vista 64 SP1 and installed my copy Office 2003
on it. Now when I try to run the VBA I get various errors when using
the SHDocVW functions


<snip


I have tried running Excel as Adminstrator but it doesn't make any
difference although I haven't tried disabling the UAC yet. Perhaps I
should have a go as web searches haven't come up with any other
answers. I did wonder whether the 64 bit version of shdocvw.dll was
in some way incompatible with the 32 bit excel. I have tried to
browse to the 32 bit version in Tools references but Vista just
ignores the new path.
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Vista has broken my SHDocVW

On Apr 25, 4:17 pm, TimP58 wrote:
On 24 Apr, 18:41, Lynda wrote:

Wild guess here, but I'd put my money on it having to do with Vista's
built-in Big-Brother, er, I mean security features. Firewall or UAC settings,
maybe.


"TimP58" wrote:
I have a spreadsheet which I wrote some time ago for checking my
lottery results. The code is shown below and has worked perfectly on
a number of XPSP2 machines for quite some time. I have recently
upgraded my home PC to Vista 64 SP1 and installed my copy Office 2003
on it. Now when I try to run the VBA I get various errors when using
the SHDocVW functions


<snip


I have tried running Excel as Adminstrator but it doesn't make any
difference although I haven't tried disabling the UAC yet. Perhaps I
should have a go as web searches haven't come up with any other
answers. I did wonder whether the 64 bit version of shdocvw.dll was
in some way incompatible with the 32 bit excel. I have tried to
browse to the 32 bit version in Tools references but Vista just
ignores the new path.


Just as a footnote to this issue I tried Linda suggestion and turned
UAC off and surprise surprise the code now works fine. I guess it
would be nice to find out how to set the relevant permissions without
the blunderbuss approach of completely disabling the system security
but that's for another day.
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
SHdocVw event problem JU Excel Programming 0 March 16th 08 12:39 PM
how can I fix Broken Links Chris Wilkinson Excel Programming 3 July 6th 07 04:00 PM
SHDOCVW in Worksheet Dag Excel Programming 0 February 28th 06 09:57 PM
i think its broken littlemcl Excel Discussion (Misc queries) 1 October 7th 05 01:29 PM
SHDocVw.InternetExplorer Pslm1271 Excel Programming 3 August 24th 04 04:49 AM


All times are GMT +1. The time now is 06:54 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"