Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Sub ieLaunch(URL As String)
With CreateObject("InternetExplorer.Application")
.Visible = True
.Navigate URL
End With
End Sub
ieLaunch "www.google.com"
[b]Function ieLaunch(URL As String) As Object
Dim myIE As Object
Set myIE = CreateObject("InternetExplorer.Application")[/b]
With [b]myIE[/b]
.Visible = True
.Navigate URL
End With
[b]Set ieLaunch = myIE
End Function[/b]
ieLaunch "[URL unfurl="true"]www.google.com"[/URL]
'--OR--
Dim ieObj as Object
Set ieObj = ieLaunch("www.google.com")
Dim ieObj As Object
Private Sub Form_Load()
Text1.Text = "[URL unfurl="true"]www.google.com"[/URL]
If Not Text2.MultiLine Then MsgBox "Please set Text2's MultiLine property to true"
If Text2.ScrollBars <> vbBoth Then MsgBox "Please set Text2's ScrollBars property to Both"
Command1.Caption = "New Window"
Command2.Caption = "Reuse Window"
Command3.Caption = "Get Source"
Command4.Caption = "Test Google"
End Sub
Private Sub Command1_Click()
Set ieObj = ieLaunch(Text1.Text)
End Sub
Private Sub Command2_Click()
ieChange Text1.Text, ieObj
End Sub
Private Sub Command3_Click()
Text2 = ieGrabSource(ieObj)
End Sub
Private Sub Command4_Click()
[b]'Insert search string into google and submit[/b]
If Not ieObj Is Nothing Then
ieObj.document.getelementbyid("q").Value = "tek-tips visual basic"
Dim myTag As Object
For Each myTag In ieObj.document.getElementsByTagName("input")
If LCase(myTag.Type) = "submit" And InStr(1, LCase(myTag.Value), "search") Then myTag.Click
Next
End If
End Sub
[b]'Open new IE window and set URL
Function ieLaunch(URL As String) As Object
Dim myIE As Object
Set myIE = CreateObject("InternetExplorer.Application")
With myIE
.Visible = True
.Navigate URL
End With
Set ieLaunch = myIE
End Function
'Change URL of existing window, or open new if one does not exist (during program session)
Sub ieChange(URL As String, myIE As Object)
If Not myIE Is Nothing Then
With myIE
.Visible = True
.Navigate URL
End With
Else
Set myIE = ieLaunch(URL)
End If
End Sub
'Return String containing the source for the Web Document
Function ieGrabSource(myIE As Object)
If Not myIE Is Nothing Then
ieGrabSource = myIE.document.documentElement.innerhtml
End If
End Function[/b]
Option Explicit
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 Const SW_HIDE As Long = 0
Private Const SW_SHOWNORMAL As Long = 1
Private Sub Command1_Click()
ShellExecute 0&, "OPEN", "[URL unfurl="true"]www.google.com",[/URL] vbNullString, "C:\", SW_SHOWNORMAL
' c:\ = Destination Folder
End Sub