Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel Re-Starts after shut-down

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Excel Re-Starts after shut-down

Steve,
If this is Excel code, then why use GetObject ?
It should work with Application.Quit

You do know MS do not support Office apps used in this server environment ?

NickHK

"SteveP" wrote in message
oups.com...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel E-2007 starts, but Installer also starts 3 times??? Thanks for the Great Tip Setting up and Configuration of Excel 0 January 24th 10 03:21 AM
Excel Fill In not shut off. Shanny Excel Discussion (Misc queries) 2 January 11th 07 04:56 PM
Ignoring code to shut a workbook if it is already shut Cammy Excel Discussion (Misc queries) 1 September 12th 06 06:12 PM
Shut down excel Greg B Excel Discussion (Misc queries) 1 April 26th 05 07:05 AM
Excel instance not shut down Macca Excel Worksheet Functions 0 December 13th 04 03:55 PM


All times are GMT +1. The time now is 07:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"