There's a listbox with e.g. six items (Internet addresses).
So, is it possible to open Netscpe six times with the
addresses in this listbox ?
Thanks for some ideas, Matt-D(eutschland) :) ;)
Printable View
There's a listbox with e.g. six items (Internet addresses).
So, is it possible to open Netscpe six times with the
addresses in this listbox ?
Thanks for some ideas, Matt-D(eutschland) :) ;)
Sure!
This will launch all the listbox items in a new browser window (the default one)
Just run LaunchUrls and you're done...Code:Private 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
Private Declare Function FindExecutable Lib "shell32.dll" Alias "FindExecutableA" (ByVal lpFile As String, ByVal lpDirectory As String, ByVal lpResult As String) As Long
Public Sub Launch(URL As String)
Dim PROG$
PROG = FindEXE
If Len(PROG) Then
ShellExecute hWnd, "OPEN", PROG, URL, "", 1
End If
End Sub
Function FindEXE() As String
'I didn't wrote this, dunno who the author is, sorry.
Dim Path$, fn%
Path = Space(255)
fn = FreeFile
Open "C:\Temp.htm" For Output As #fn
Close #fn
FindEXE = Left(Path, FindExecutable("C:\Temp.htm", "", ByVal Path))
Kill "C:\Temp.htm"
End Function
Private Sub LaunchUrls()
Dim x&
For x = 0 To List1.ListCount - 1
Launch List1.List(x)
Next x
End Sub