Internet Instances

Internet Instances

am 10.01.2008 11:03:49 von Dominic Vella

Hi

I have a list of favorite websites in a table.

I use the following command to view it:

strAppName = "C:\Program Files\Internet Explorer\iexplore.exe " &
me!web_address
Call Shell(strAppName, 1)

Problem is iexplorer keeps opening a new instance each time it's called.

Is there a way to track the old instance and open another page in place of
the old one?


Thanks in advance

Re: Internet Instances

am 10.01.2008 15:00:19 von Allen Browne

Just use FollowHyperlink, with the URL.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Dominic Vella" wrote in message
news:4785ed78$0$12282$afc38c87@news.optusnet.com.au...
>
> I have a list of favorite websites in a table.
>
> I use the following command to view it:
>
> strAppName = "C:\Program Files\Internet Explorer\iexplore.exe " &
> me!web_address
> Call Shell(strAppName, 1)
>
> Problem is iexplorer keeps opening a new instance each time it's called.
>
> Is there a way to track the old instance and open another page in place of
> the old one?

Re: Internet Instances

am 10.01.2008 21:52:23 von Dominic Vella

Thanks for replying
Sorry I'm not sure if I was clear enough.
In this example I would have 2 instances of Internet Explorer appear:

strAppName = "C:\Program Files\Internet Explorer\iexplore.exe " &
me!txtWebAddress1
Call Shell(strAppName, 1)
strAppName = "C:\Program Files\Internet Explorer\iexplore.exe " &
me!txtWebAddress2
Call Shell(strAppName, 1)

What I want is for the second shell call to find the first instance, and
replace the URL so that the new address would appear instead of the first.

Is this possible?

By the way, your website is fantastic.


"Allen Browne" wrote in message
news:478624f4$0$11972$5a62ac22@per-qv1-newsreader-01.iinet.n et.au...
> Just use FollowHyperlink, with the URL.
>
> --
> Allen Browne - Microsoft MVP. Perth, Western Australia
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
>
> "Dominic Vella" wrote in message
> news:4785ed78$0$12282$afc38c87@news.optusnet.com.au...
>>
>> I have a list of favorite websites in a table.
>>
>> I use the following command to view it:
>>
>> strAppName = "C:\Program Files\Internet Explorer\iexplore.exe " &
>> me!web_address
>> Call Shell(strAppName, 1)
>>
>> Problem is iexplorer keeps opening a new instance each time it's called.
>>
>> Is there a way to track the old instance and open another page in place
>> of the old one?
>

Re: Internet Instances

am 10.01.2008 22:36:27 von Stuart McCall

"Dominic Vella" wrote in message
news:47868575$0$8437$afc38c87@news.optusnet.com.au...
> Thanks for replying
> Sorry I'm not sure if I was clear enough.
> In this example I would have 2 instances of Internet Explorer appear:
>
> strAppName = "C:\Program Files\Internet Explorer\iexplore.exe " &
> me!txtWebAddress1
> Call Shell(strAppName, 1)
> strAppName = "C:\Program Files\Internet Explorer\iexplore.exe " &
> me!txtWebAddress2
> Call Shell(strAppName, 1)
>
> What I want is for the second shell call to find the first instance, and
> replace the URL so that the new address would appear instead of the first.
>
> Is this possible?
>
> By the way, your website is fantastic.
>
>
> "Allen Browne" wrote in message
> news:478624f4$0$11972$5a62ac22@per-qv1-newsreader-01.iinet.n et.au...
>> Just use FollowHyperlink, with the URL.
>>
>> --
>> Allen Browne - Microsoft MVP. Perth, Western Australia
>> Tips for Access users - http://allenbrowne.com/tips.html
>> Reply to group, rather than allenbrowne at mvps dot org.
>>
>> "Dominic Vella" wrote in message
>> news:4785ed78$0$12282$afc38c87@news.optusnet.com.au...
>>>
>>> I have a list of favorite websites in a table.
>>>
>>> I use the following command to view it:
>>>
>>> strAppName = "C:\Program Files\Internet Explorer\iexplore.exe " &
>>> me!web_address
>>> Call Shell(strAppName, 1)
>>>
>>> Problem is iexplorer keeps opening a new instance each time it's called.
>>>
>>> Is there a way to track the old instance and open another page in place
>>> of the old one?

Forget about using Shell. Open IE via the API:

Dim ie As Object
Set ie = CreateObject("InternetExplorer.Application")
ie.Visible = True
ie.Navigate2 me!txtWebAddress1

Then when you want to 'replace the url' :

ie.Navigate2 me!txtWebAddress2

Don't forget to:

Set ie = Nothing

when you're done with it.

Re: Internet Instances

am 15.01.2008 00:02:58 von Dominic Vella

Thanks, that's great.

Dom

"Stuart McCall" wrote in message
news:fm6356$ab7$1$8300dec7@news.demon.co.uk...
> "Dominic Vella" wrote in message
> news:47868575$0$8437$afc38c87@news.optusnet.com.au...
>> Thanks for replying
>> Sorry I'm not sure if I was clear enough.
>> In this example I would have 2 instances of Internet Explorer appear:
>>
>> strAppName = "C:\Program Files\Internet Explorer\iexplore.exe " &
>> me!txtWebAddress1
>> Call Shell(strAppName, 1)
>> strAppName = "C:\Program Files\Internet Explorer\iexplore.exe " &
>> me!txtWebAddress2
>> Call Shell(strAppName, 1)
>>
>> What I want is for the second shell call to find the first instance, and
>> replace the URL so that the new address would appear instead of the
>> first.
>>
>> Is this possible?
>>
>> By the way, your website is fantastic.
>>
>>
>> "Allen Browne" wrote in message
>> news:478624f4$0$11972$5a62ac22@per-qv1-newsreader-01.iinet.n et.au...
>>> Just use FollowHyperlink, with the URL.
>>>
>>> --
>>> Allen Browne - Microsoft MVP. Perth, Western Australia
>>> Tips for Access users - http://allenbrowne.com/tips.html
>>> Reply to group, rather than allenbrowne at mvps dot org.
>>>
>>> "Dominic Vella" wrote in message
>>> news:4785ed78$0$12282$afc38c87@news.optusnet.com.au...
>>>>
>>>> I have a list of favorite websites in a table.
>>>>
>>>> I use the following command to view it:
>>>>
>>>> strAppName = "C:\Program Files\Internet Explorer\iexplore.exe " &
>>>> me!web_address
>>>> Call Shell(strAppName, 1)
>>>>
>>>> Problem is iexplorer keeps opening a new instance each time it's
>>>> called.
>>>>
>>>> Is there a way to track the old instance and open another page in place
>>>> of the old one?
>
> Forget about using Shell. Open IE via the API:
>
> Dim ie As Object
> Set ie = CreateObject("InternetExplorer.Application")
> ie.Visible = True
> ie.Navigate2 me!txtWebAddress1
>
> Then when you want to 'replace the url' :
>
> ie.Navigate2 me!txtWebAddress2
>
> Don't forget to:
>
> Set ie = Nothing
>
> when you're done with it.
>
>
>