Results 1 to 8 of 8

Thread: Launching IE as an Object [RESOLVED]

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Location
    Chicago
    Posts
    136

    Question Launching IE as an Object [RESOLVED]

    I'm using the code below to launch IE and navigate to a website. I'm having a problem with it because the site it goes to uses cookies for user sessions. The cookie contains, among other information, the user's login name. There is also another program that uses the same method to launch IE that goes to the same page, however, it requires a different log in to access different parts of the site. Currently people who launch one program first aren't able to login if they try to launch the second program. If they manually go to the website and do it it works though. Anyone have any ideas as to why this is happening?


    Code for first app:
    VB Code:
    1. Private Sub Form_Load()
    2.  
    3. Dim objMSIE1
    4. Dim boolFileExists As Boolean
    5. Dim strNotFound As String
    6.  
    7. Set objMSIE1 = CreateObject("InternetExplorer.Application")
    8. If Err.Number = 0 Then 'No error
    9.             boolFileExists = True
    10.             outrc = 0
    11.         Else
    12.             boolFileExists = False
    13.             strNotFound = "I cannot find Internet Explorer." & vbCrLf & "Please download Internet Explorer from www.microsoft.com/windows/ie"
    14.             MsgBox strNotFound, vbCritical, "Application Error"
    15.             outrc = 1
    16.             Exit Sub
    17.         End If
    18.  
    19. objMSIE1.Navigate ("https://website/")
    20. objMSIE1.Visible = True
    21.  
    22. Set objMSIE1 = Nothing
    23. Unload Me
    24. End
    25. End Sub


    Code for second app:
    VB Code:
    1. Private Sub Form_Load()
    2.  
    3. Dim objMSIE
    4. Dim boolFileExists As Boolean
    5. Dim strNotFound As String
    6.  
    7. Set objMSIE = CreateObject("InternetExplorer.Application")
    8. If Err.Number = 0 Then 'No error
    9.             boolFileExists = True
    10.             outrc = 0
    11.         Else
    12.             boolFileExists = False
    13.             strNotFound = "I cannot find Internet Explorer." & vbCrLf & "Please download Internet Explorer from www.microsoft.com/windows/ie"
    14.             MsgBox strNotFound, vbCritical, "Application Error"
    15.             outrc = 1
    16.             Exit Sub
    17.         End If
    18.  
    19. objMSIE.Navigate ("https://website/")
    20. objMSIE.Visible = True
    21.  
    22. Set objMSIE = Nothing
    23. Unload Me
    24. End
    25. End Sub
    Last edited by bat711; Apr 15th, 2005 at 11:10 AM.

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