Help with closing window

I have designed a program in Visual Basic 6, when a form opens it has a series of buttons, one of the buttons opens Internet Explorer and displays a Web Page. The problem is that i have a hyperlink to close the window in the web page, a message comes up generated by Internet Explorer saying "The web page you are viewing is trying to close the windows" This then lets you click yes or no to close the window, any ideas how to get rid of this?

Thanks people
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ryan ChongCommented:
That is the IE behaviour, unless you using to open the web page.
Richie_SimonettiIT OperationsCommented:
how do you open the IE window in first place?
NORTHBROOKAuthor Commented:
This is what im using: -

Private Sub showacp_Click()
     Dim FileName As String, Dummy As String
     Dim BrowserExec As String * 255
     Dim RetVal As Long
     Dim FileNumber As Integer
     BrowserExec = Space(255)
     FileName = "C:\temphtm.HTM"
     FileNumber = FreeFile
     Open FileName For Output As #FileNumber
         Write #FileNumber, "<HTML> <\HTML>"
     Close #FileNumber
     RetVal = FindExecutable(FileName, Dummy, BrowserExec)
     BrowserExec = Trim(BrowserExec)
     If RetVal <= 32 Or IsEmpty(BrowserExec) Then
         MsgBox "Could not find associated Browser", vbExclamation, _
           "Browser Not Found"
         RetVal = ShellExecute(Me.hwnd, "open", BrowserExec, _
           "-k http://nbcintranet/applications/circulars/file.asp?ID=78", "", SW_SHOWNORMAL)
         If RetVal <= 32 Then
             MsgBox "Web Page not Opened", vbExclamation, "URL Failed"
         End If
     End If
     Kill FileName
     End Sub
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Richie_SimonettiIT OperationsCommented:
Well, if you use Automation, you could access the click event of the link and let your program close the window, not IE itself.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Richie_SimonettiIT OperationsCommented:
This old question (QID 20566372) needs to be finalized -- accept an answer, split points, or get a refund.  Please see for information and options.
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

 -->Accept Richie_Simonetti's comment as Answer

Please leave any comments here within the next seven days.


Cleanup Volunteer
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.