Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 169
  • Last Modified:

Close IE Window

I'm trying to redirect the webpage that i'm on from it's current one back to the homepage once 'ok' has been hit. I'm running into problems while trying to accomplish this task. I just want the window to close once 'cancel' has been hit and a new window to open once the window has closed. I guess in this case a redirection would make most sense, but i'm also trying to learn how to close IE windows.


If rs.EOF Then
            message  = MsgBox "You need to login again!", 49, "Cannot Log User In"
            if message = 1 then
Set IE = CreateObject("InternetExplorer.Application")
            IE.navigate "http://localhost", 1
elseif message = 2
(Trying to close IE Window)
(Then I'm trying to open a new one and direct to http://localhost)
      Else
*blah blah blah


Thanks,
NP
0
NP2322
Asked:
NP2322
1 Solution
 
jkaiosCommented:
Have you tried the quit method?

  IE.Quit
0
 
hesCommented:
Set a reference to Microsoft Internet Controls:


Dim ShellWin As New ShellWindows
Dim IE As InternetExplorer


For Each IE In ShellWin
     IE.Quit
Next
Set IE = Nothing
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now