Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Can I control Internet Explorer using Excel VBA?

Hello there,

I'm fairly good with writing Excel, Word, & Access VBA.

Is there a way to control IE using VBA code?

Any info will be most welcome.

Thanks in advance (TIA),

JohnI


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Can I control Internet Explorer using Excel VBA?

Hi Johnl,

Yes. See this code:

Dim IEObj As Object

Sub Test()
OpenIE "http://example.microsoft.com"
End Sub

Public Sub OpenIE(vURL As String)
On Error GoTo ErrorHandler
IEObj.Visible = True
With IEObj
.Visible = True
.Navigate vURL
Do Until Not .Busy
DoEvents
Loop
End With
Exit Sub
ErrorHandler:
Set IEObj = Nothing
Set IEObj = CreateObject("InternetExplorer.Application")
Resume Next
End Sub


HTH

---
Orlando Magalhães Filho

(So that you get best and rapid solution and all may benefit from the
discussion, please reply within the newsgroup, not in email)



"JohnI" escreveu na mensagem
...
Hello there,

I'm fairly good with writing Excel, Word, & Access VBA.

Is there a way to control IE using VBA code?

Any info will be most welcome.

Thanks in advance (TIA),

JohnI




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Can I control Internet Explorer using Excel VBA?

Orlando,

I tried out your code & it works just great. Thanks.

Next question - how do I find the Internet Explorer Object Model?
I noticed you used commands such as .Navigate & .Busy.

If there are input boxes & buttons on a web page, can I control them.
Also I want to copy text & paste it into Excel or Word.

regards,

JohnI

"Orlando Magalhães Filho" wrote in message
...
Hi Johnl,

Yes. See this code:

Dim IEObj As Object

Sub Test()
OpenIE "http://example.microsoft.com"
End Sub

Public Sub OpenIE(vURL As String)
On Error GoTo ErrorHandler
IEObj.Visible = True
With IEObj
.Visible = True
.Navigate vURL
Do Until Not .Busy
DoEvents
Loop
End With
Exit Sub
ErrorHandler:
Set IEObj = Nothing
Set IEObj = CreateObject("InternetExplorer.Application")
Resume Next
End Sub


HTH

---
Orlando Magalhães Filho

(So that you get best and rapid solution and all may benefit from the
discussion, please reply within the newsgroup, not in email)



"JohnI" escreveu na mensagem
...
Hello there,

I'm fairly good with writing Excel, Word, & Access VBA.

Is there a way to control IE using VBA code?

Any info will be most welcome.

Thanks in advance (TIA),

JohnI






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
Internet Explorer 7 & Excel 2000 MEAD5432 Excel Discussion (Misc queries) 0 October 15th 09 08:36 PM
How do I view Excel data in Internet Explorer? Wolfman566 Excel Discussion (Misc queries) 1 May 2nd 09 11:16 AM
Launching Excel From internet Explorer pjnesbitt Excel Discussion (Misc queries) 0 June 27th 06 04:21 PM
Running Internet Explorer from Excel Wojciech G. Charts and Charting in Excel 3 August 19th 05 02:50 PM
Hyperlink from Internet Explorer to Excel Ian West Excel Discussion (Misc queries) 0 July 20th 05 02:25 PM


All times are GMT +1. The time now is 12:16 AM.

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"