Is it possible to run Internet Explorer from a vb program. I created an internet explorer document and saved it on my local drive, but I need to pass values back from internet explorer to my program. Is there a way to do this?
thanks
Printable View
Is it possible to run Internet Explorer from a vb program. I created an internet explorer document and saved it on my local drive, but I need to pass values back from internet explorer to my program. Is there a way to do this?
thanks
Here's some code from one of my forms... you can wade through it and pick out what you need.
VB Code:
Option Explicit 'global variable for use in displaying logs on intranet (*.*.*.*) Dim IE As InternetExplorer 'show about form Private Sub About_Click(Index As Integer) frmAbout.Show End Sub 'show daily value form Private Sub cmdDV_Click() frmDV.Show End Sub 'show outage form Private Sub cmdOutages_Click() frmOutage.Show End Sub 'show misc form Private Sub cmdMisc_Click() frmMisc.Show End Sub 'show calender of logs Private Sub cmdyesterday_Click() Dim strA As String Dim strB As String Dim strC As String 'create date strings strA = Format(Now, "yy") strB = Format(Now, "mm") strC = Format(Now, "dd") 'open IE and show log Set IE = New InternetExplorer IE.Visible = True IE.Navigate "K:\Engineering\Inetlog\calenders\" & strB & strA & ".htm" End Sub 'exit form Private Sub Exit_Click(Index As Integer) Unload Me End Sub Private Sub LCRecip_Click() Shell "Notepad " & App.Path & "\elistcall.txt", vbNormalFocus End Sub Private Sub LogRecip_Click() Shell "Notepad " & App.Path & "\elist.txt", vbNormalFocus End Sub 'show today's log Private Sub TLog_Click(Index As Integer) Dim strA As String Dim strB As String Dim strC As String 'create date strings strA = Format(Now, "yy") strB = Format(Now, "mm") strC = Format(Now, "dd") 'open IE and show log Set IE = New InternetExplorer IE.Visible = True IE.Navigate "K:\Engineering\Inetlog\" & strA & "\" & strB & "\" & strB & strC & strA & ".htm" End Sub 'show yesterday's log Private Sub YLog_Click(Index As Integer) Dim strA As String Dim strB As String Dim strC As String Dim strX As String 'create date strings strX = Now - 1 strA = Format(strX, "yy") strB = Format(strX, "mm") strC = Format(strX, "dd") 'open IE and show yesterday's log Set IE = New InternetExplorer IE.Visible = True IE.Navigate "K:\Engineering\Inetlog\" & strA & "\" & strB & "\" & strB & strC & strA & ".htm" End Sub