open the internet explorer from access (1 Viewer)

24sharon

Registered User.
Local time
Today, 13:29
Joined
Oct 5, 2004
Messages
147
I want to open the internet explorer from access

but with url

for example

dim strUrl as string
strUrl = "http://www.google.com"

'here I want to open the explorer with the strUrl

thanks!
 

Ron_dK

Cool bop aficionado
Local time
Today, 22:29
Joined
Sep 5, 2002
Messages
2,141
Open your form in design mode and insert Hyperlink :
ensure that in the label properties the correct hyperlink address is given, i.e.:

http://www.access-programmers.co.uk/forums/

The on click event on that label should fire off the requested Url.
 

24sharon

Registered User.
Local time
Today, 13:29
Joined
Oct 5, 2004
Messages
147
thanks!

first I need it by code no by link

second i found this code
Code:
Private Sub Command17_Click()
Dim strUrl As String
strUrl = "http://www.google.com"
Call Shell("explorer.exe " & strUrl, 5)
End Sub

my problem now is that the internet explorer open minimize I want to open it maximize and to focuse the i.e.
 

ghudson

Registered User.
Local time
Today, 16:29
Joined
Jun 8, 2002
Messages
6,195
Code:
Dim strUrl As String
strUrl = "http://www.google.com"
Call Shell("explorer.exe " & strUrl, [COLOR="Blue"]vbMaximizedFocus[/COLOR])
 

DKDiveDude

Registered User.
Local time
Today, 16:29
Joined
Mar 28, 2003
Messages
56
On my PC using Windows XP sp2 and MS Access 2003 sp2, using the above example:

Call Shell("explorer.exe " & strUrl, vbMaximizedFocus)

My Internet Explorer does not open Maximized. Nor Minimized I mean in the taskbar, but in a sized window even though I previously maximized IE and closed it.

Actually I now tried all the WindowStyle combinations, including vbMinimizedFocus and they all do the same, open a sized window!


On a side note, this has been nagging me for years. Why does a hyperlink set via VBA to an unbound field with the Hyperlink property set to yes, not work?!? Tried plain web link and adding #'s, nothing works. Not clickable!!!
 

Users who are viewing this thread

Top Bottom