Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 27th, 2012, 03:53 AM
Registered User
Points: 3, Level: 1
Points: 3, Level: 1 Points: 3, Level: 1 Points: 3, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default VB internet control issue, help!

Hi,

I have an issue with vb internet control. Am getting an Access Denied error msg even tho I have ticked the reference 'Microsoft Internet Controls'. This reference points to C:\Windows\SysWOW64\ieframe.dll, whereas I think the code I am using needs this to point to shdocvw.dll.

The code I am using is the following, can anyone tell me why this is not working with the above references ticked. And more importantly how should i change the below code to work with the new windows7 64 bit reference:
C:\Windows\SysWOW64\ieframe.dll

thx in advance. Russ


Option Explicit

Private IE As Object
Dim t As Date

Sub StartTimer()
If t <> CDate(0) Then Exit Sub
Call xscores
End Sub

Sub StopTimer()
On Error Resume Next
Application.OnTime EarliestTime:=t, Procedure:="xscores", Schedule:=False
t = CDate(0)
Call DisconnectFrom
On Error GoTo 0
End Sub


Private Function NavigateTo(strURL As String)
If IE Is Nothing Then Set IE = CreateObject("InternetExplorer.Application")

With IE
.Visible = False
.Navigate strURL
Do Until (.ReadyState = 4 And Not .Busy): DoEvents: Loop

End With
End Function
Private Function DisconnectFrom()
IE.Quit
Set IE = Nothing
End Function

Sub xscores()
Application.ScreenUpdating = False
Dim strURL As String
Dim ieDoc As Object
Dim AllTables As Object
Dim xTable As Object
Dim myWkSht As Worksheet
Dim TblRow As Object
Dim tblCell As Object

Dim r As Integer
Dim c As Integer
Columns("N:O").NumberFormat = "@"
strURL = "http://xscores.com/LiveScore.do?state=soccer&sport=1"

If t = CDate(0) Then
Call NavigateTo(strURL)
End If

Set ieDoc = IE.Document
Set AllTables = ieDoc.frames(3).Document.frames(1).Document.getEle mentsByTagName("TABLE")
Set xTable = AllTables.Item(0)
Set myWkSht = ThisWorkbook.Sheets("Sheet1")

r = 0
c = 0

For Each TblRow In xTable.Rows
r = r + 1
For Each tblCell In TblRow.Cells
c = c + 1
myWkSht.Cells(r, c) = tblCell.innerText
Next tblCell
c = 0
Next TblRow
r = 0

Dim rng As Range
For Each rng In Range(Sheets(1).Range("A1"), Sheets(1).Range("A65536").End(xlUp))

If rng.Text = "K/O" Then
rng.Offset(0, 3).Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
rng.Offset(0, 8).Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
rng.Offset(0, 16).Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
End If
Next rng
Columns("U:U").ClearContents
Range("A1").Select

'Call DisconnectFrom
't is set at 1 minute intervals
t = Now() + TimeValue("00:01:00")
Application.OnTime EarliestTime:=t, Procedure:="xscores", Schedule:=True
Application.ScreenUpdating = True
End Sub
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Internet Explorer Issue wndy26 BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 2 June 23rd, 2004 11:11 PM
Help w/Internet Control in VB.NET jagged30net Pro VB.NET 2002/2003 1 May 29th, 2004 02:33 AM
Help w/Internet Control in VB.NET jagged30net VB.NET 0 December 17th, 2003 10:51 PM
internet explorer issue ak Classic ASP Basics 2 September 29th, 2003 04:00 AM
Internet Transfer Control jake VB How-To 5 July 28th, 2003 04:59 AM



All times are GMT -4. The time now is 06:02 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.