[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.excel.programming

Excel Re-Starts after shut-down

SteveP

12/19/2006 9:29:00 PM

I have a VBA in Excel. It runs successfully on a stand alone PC,
reading files, directories, etc on the network.

We recently put it on the webserver, and created a link on a webpage.
The .xls file loads and the program runs fine (it does start slow). I
have an EXIT button where I use ".quit" - the program disappears and
then excel opens on my PC and starts the program over again. I hit EXIT
a second time and it shuts down finally.

When I have Program Manager open and the web brower is running the
application - it does not show Excel as an open application.

When it re-starts of course Excel shows.

The program opens several workbooks and collects information into
arrays that are used to populate a userform.

This is the code for EXIT button:

Private Sub ExitButton_Click()
Dim xlApp As Excel.Application
Set xlApp = GetObject(, "Excel.application")
xlApp.Visible = True
xlApp.Quit
Set xlApp = Nothing
End Sub