View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default retrieve data from an .aspx web page


Answer: The 2nd instance was from another macro that I forgot to delete
1. I notice two instances of IE. I'm wondering the
purpose of opening two instances.

Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True

Set IE2 = CreateObject("InternetExplorer.Application")
IE2.Visible = True

Answer: The dump is something I use for debugging. It is not necessary.
the dump requires a worksheet called "Dump"
2. I'm not clear what to do with The Call Dump(IE)
section.

The code doesn't select the object, jst displays the contents of the object.
didn't know what you need the object for.
If I click "Ok" on the message boxes, the
"Select Company" drop down is not selected. Then 4
more message boxes are activated--Glenair,
ElectroAdapter, etc. I click the OK button each
time, but no data is written to the "Dump" sheet.

Answer : The macro isn't interactive with the webpage.

If I select the company name as the Message box
directs, the "Call Dump" code returns an error
Run-time error '70': Permission Denied. No line of
code is highlighted that I can tell.

Answer : Once you naviagate to another webpage the VBA code doesn't
recognize the new object. the VBA code would have to perform the action.

3. I'm not seeing the results I expected. I am hoping
to see a Glenair Series and it's corresponding
Amphenol Series. There is another level deeper
where the site generates an entire Amphenol
part number. I don't know if this level is
accessible.

Anwer : The webpage object has a property "Document" and the another
property below the document called all. The dump code is putting 4 of the
all poperties on the worksheet

Column A : The Tagname property
Column B : The ID property
Column C : The classname property
Column D : the 1st 1024 characters of the innertext property. Excel
creates an error when the string size gets too long

There are more properties if you add itm to the watch window you will see
additional items.

4. The code does return data, but I don't understand
the data. For example: the following data is
written to cell D2:

You sould look at the source code of the webpage by going to the IE menu

View - Source
or
Tools - Developer tools F12


I don't know what you wanted to do and just got you started. I assumed if
you need more details you would ask. It is hard sometimes from one question
to know a persons skill level.