-
Hi!
I have this in a module:
Code:
Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Public Function OpenURL(ByVal URL As String) As Long
OpenURL = ShellExecute(0&, vbNullString, URL, vbNullString, vbNullString, vbNormalFocus)
This code opens a URL perfectly but I want a code for opening a URL in a new window.
Any suggestions?
ThanX. :)
-
It should open a new window.
If no window is open, than it will open one.
If not, than it will use the current open browser.
-
That's my point!
I want it to open a new window even when there's a window open. Less trouble that way :)
-
No need for the ShellExecute api function then.
Code:
Shell Chr(34) & "C:\Program Files\Internet Explorer\IEXPLORE.EXE" & Chr(34) & Chr(32) & "http://www.vb-world.net", vbNormalFocus