+ Reply to Thread
Results 1 to 3 of 3

Thread: Open Internet Explorer as "InPrivate"

  1. #1
    Registered User
    Join Date
    11-03-2011
    Location
    Ontario
    MS-Off Ver
    Excel 2010
    Posts
    2

    Open Internet Explorer as "InPrivate"

    I am looking for a method to open internet explorer 9 as "InPrivate" mode so that I can log into a site under multiple logins.

    Private Sub LaunchCRM()
        Dim TimeOutCheck As Integer
        
        TimeOutCheck = 0
        USERNAME = Cells(Cells(2, "A").Value + 2, "C")
        PASSWORD = Cells(Cells(2, "A").Value + 2, "D")
        
        Set IE = CreateObject("InternetExplorer.Application")
        IE.Navigate "WEBSITE"
        IE.Visible = True
        AppActivate IE
        
        Do While FindWindow(vbNullString, "Windows Security") = 0 And FindWindow(vbNullString, "Connect to admin.saveonenergy.ca") = 0
            Application.Wait DateAdd("s", 1, Now)
            TimeOutCheck = TimeOutCheck + 1
            If TimeOutCheck = 15 Then
                MsgBox ("Timed out due to window not existing." & vbNewLine & "Please try again.")
                Exit Sub
            End If
        Loop
        
        Call FillLogin(USERNAME, PASSWORD)
        Call SetNumLockKey(True)
        
        If Cells(1, "A").Value = True Then
            Application.OnTime Now + TimeValue("00:00:01"), "LoginPrompt"
        End If
    End Sub
    How could I go about opening multiple instances of IE while keeping cookies isolated for each one, the only method I can think of is to open IE in its private mode. However after a significant amount of searching I haven't seen a function to do that. I am trying to avoid the "Application.SendKeys (Ctrl/Shift + P)" method and launch private IE (and set it as an object).

    Thanks in advance.

  2. #2
    Valued Forum Contributor
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2003
    Posts
    2,488

    Re: Open Internet Explorer as "InPrivate"

    hi, cerothen, as an option you can set the IE to start "In private" mode by default by amending registry, search the Internet on how to do that
    Last edited by watersev; 11-03-2011 at 09:57 AM.

  3. #3
    Registered User
    Join Date
    11-03-2011
    Location
    Ontario
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Open Internet Explorer as "InPrivate"

    Thanks for the reply. However I am not looking to open IE as an "InPrivate" window be default. I am looking to when I call a function open an "InPrivate" window. Before my first post I had already looked into the registry option of that. However as this will be given to a few colleges it they likely don't want their IE to always open as "InPrivate".

    Basically I am looking for something that would be similar to a call:

    Set IE = CreateObject("InternetExplorer.Application.InPrivate")

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.2.0