Thread: ExecWB
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Art Art is offline
external usenet poster
 
Posts: 587
Default ExecWB

It's not an error. Just I needed a macro to get import information from the
web based on the info from a cell in excel. Someone gave me the following
VBA, and was wondering when it comes to select the web page it uses this
code. the VBA is as followes:

Sub Button1_Click()
Set ie = CreateObject("InternetExplorer.Application")

With ie
.Visible = True
.Navigate "http://www.google.com/"
.Top = 50
.Left = 530
.Height = 400
.Width = 400

' Loop until the page is fully loaded
Do Until Not ie.Busy And ie.ReadyState = 4
DoEvents
Loop

' Make the desired selections on the Login web page and click the submit
Button
Set ipf = ie.Document.all.Item("q")
ipf.Value = Range("A1")

ie.Document.all.Item("btnG").Click

' Loop until the page is fully loaded
Do Until Not ie.Busy And ie.ReadyState = 4
DoEvents
Loop


' Copy the entire web page and then paste it as text into the Worksheet
ie.ExecWB 17, 2
ie.ExecWB 12, 0

Range("A3").Select
ActiveSheet.PasteSpecial Format:="Text", Link:=False,
DisplayAsIcon:=False
Range("A3").Select

End With

ie.Quit

I would like to rather select just part of the web page and this selects the
whole page. Any help?

"Dave Peterson" wrote:

It looks like it's some kind of call to a webbrowser (at least there were a few
hits on google for that).

When do you see it?

What problem does it cause?



art wrote:

It has no defention. So what does it mean. what does it do. If there is no
definition, then it is prob. not something built in.

"Jim Rech" wrote:

It's nothing build-in. Select it and press Shift-F2 to go to the
definition, if it has one.

--
Jim
"art" wrote in message
...
| Hello:
|
| What's the code: "ExecWB"
| HOw does this work?



--

Dave Peterson