View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.misc
Tom Tom is offline
external usenet poster
 
Posts: 49
Default How to use the "shell" command?

"Steve Yandl" wrote in message
...
Tom,

That's why I asked you what you meant by "default" web page in your
original question.

I meant the URL or the active web page whose data I had selected for
copying.
There could be other web pages open but not active and whose URL addresses
all began with http://www.graysonline


There can be multiple web pages open at any time and the subroutine look
at all of them. The results produced are from the last page the sub
looked at (results overwrite previous results, even if the new result is a
blank).

Would refreshing the wanted page makes it the last page for the sub to look
at?
If not closing it down and reopening it again would that make it the last
page?
Any other suggestions?


Not only that, the shell windows collection includes
Windows Explorer windows as well as Internet Explorer windows.

The line
If InStr(objIE.LocationURL, "http") Then
checks to make sure the url of the window contains the letters "http" and
ignores windows that don't include that combination.

If there are other http://www.graysonline pages that are open, for your sub
to target
a specific URL like say,
http://www.graysonline.com/lot/0001-...0-024-notebook
do I have to replace "http" by the above full address?

That's how I avoided having the routine fail by trying to parse any open
Explorer windows (like desktop and start button which are pretty much
always open). You can expand what is contained inside the double quotes
in that line of code so that the sub will ignore IE windows not open to
the graysonline website.


Steve



"Tom" wrote in message
...
One last question. Often I have other web pages open. I found that your
macro did not know the data of the web page I had selected when I ran it.
But if I closed all the others it had no problem. If several web pages
are open is there a way (e.g. include the URL in your codes) for it to
associate with the one whose data has been selected?

Tom