Results 1 to 2 of 2

Thread: running internet explorer from vb

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2002
    Posts
    44

    running internet explorer from vb

    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

  2. #2
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945
    Here's some code from one of my forms... you can wade through it and pick out what you need.


    VB Code:
    1. Option Explicit
    2. 'global variable for use in displaying logs on intranet (*.*.*.*)
    3. Dim IE As InternetExplorer
    4. 'show about form
    5. Private Sub About_Click(Index As Integer)
    6. frmAbout.Show
    7. End Sub
    8. 'show daily value form
    9. Private Sub cmdDV_Click()
    10. frmDV.Show
    11. End Sub
    12. 'show outage form
    13. Private Sub cmdOutages_Click()
    14. frmOutage.Show
    15. End Sub
    16. 'show misc form
    17. Private Sub cmdMisc_Click()
    18. frmMisc.Show
    19. End Sub
    20. 'show calender of logs
    21. Private Sub cmdyesterday_Click()
    22.  
    23. Dim strA As String
    24. Dim strB As String
    25. Dim strC As String
    26. 'create date strings
    27. strA = Format(Now, "yy")
    28. strB = Format(Now, "mm")
    29. strC = Format(Now, "dd")
    30. 'open IE and show log
    31. Set IE = New InternetExplorer
    32. IE.Visible = True
    33. IE.Navigate "K:\Engineering\Inetlog\calenders\" & strB & strA & ".htm"
    34.  
    35. End Sub
    36. 'exit form
    37. Private Sub Exit_Click(Index As Integer)
    38. Unload Me
    39. End Sub
    40.  
    41. Private Sub LCRecip_Click()
    42. Shell "Notepad " & App.Path & "\elistcall.txt", vbNormalFocus
    43. End Sub
    44.  
    45. Private Sub LogRecip_Click()
    46. Shell "Notepad " & App.Path & "\elist.txt", vbNormalFocus
    47. End Sub
    48.  
    49. 'show today's log
    50. Private Sub TLog_Click(Index As Integer)
    51. Dim strA As String
    52. Dim strB As String
    53. Dim strC As String
    54. 'create date strings
    55. strA = Format(Now, "yy")
    56. strB = Format(Now, "mm")
    57. strC = Format(Now, "dd")
    58. 'open IE and show log
    59. Set IE = New InternetExplorer
    60. IE.Visible = True
    61. IE.Navigate "K:\Engineering\Inetlog\" & strA & "\" & strB & "\" & strB & strC & strA & ".htm"
    62.  
    63. End Sub
    64. 'show yesterday's log
    65. Private Sub YLog_Click(Index As Integer)
    66. Dim strA As String
    67. Dim strB As String
    68. Dim strC As String
    69. Dim strX As String
    70. 'create date strings
    71. strX = Now - 1
    72. strA = Format(strX, "yy")
    73. strB = Format(strX, "mm")
    74. strC = Format(strX, "dd")
    75. 'open IE and show yesterday's log
    76. Set IE = New InternetExplorer
    77. IE.Visible = True
    78. IE.Navigate "K:\Engineering\Inetlog\" & strA & "\" & strB & "\" & strB & strC & strA & ".htm"
    79.  
    80. End Sub
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width