Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Quiting Excel

After some other processes take place I wish to exit the
excel application. I have pasted what code I have here to
see where I go from here. Notice in the Close Excel
section i'm getting the excel file to close it just will
not exit my application.


'-----------------
'Open word
Dim WordApp As Object
Set WordApp = CreateObject("Word.Application")
WordApp.Documents.Open "c:\PSV Travelog\Travelog
Template.dot"
WordApp.Visible = True
WordApp.Documents("Travelog Template.dot").Close
SaveChanges:=False

'-------------------
'Close Excel
Application.DisplayAlerts = False
Workbooks("PSV WO and Specs.xls").Close 'Close
Excel


'------------------
'Program Ending

' --- Do not modify ---
GoTo EndMain
Main_Err:
Main_Error_Handler

EndMain:

End_Text = "Macro Finished" & vbCrLf _
& "Time Started :" & Start_Time & vbCrLf _
& "Time Completed:" & Now & vbCrLf _
& "Your File is Open in word you may print it
now!"
End_Macro End_Text
End Sub ' Main

Michael
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Quiting Excel

Hi Michael
add the line
application.quit

--
Regards
Frank Kabel
Frankfurt, Germany

Michael Wise wrote:
After some other processes take place I wish to exit the
excel application. I have pasted what code I have here to
see where I go from here. Notice in the Close Excel
section i'm getting the excel file to close it just will
not exit my application.


'-----------------
'Open word
Dim WordApp As Object
Set WordApp = CreateObject("Word.Application")
WordApp.Documents.Open "c:\PSV Travelog\Travelog
Template.dot"
WordApp.Visible = True
WordApp.Documents("Travelog Template.dot").Close
SaveChanges:=False

'-------------------
'Close Excel
Application.DisplayAlerts = False
Workbooks("PSV WO and Specs.xls").Close 'Close
Excel


'------------------
'Program Ending

' --- Do not modify ---
GoTo EndMain
Main_Err:
Main_Error_Handler

EndMain:

End_Text = "Macro Finished" & vbCrLf _
& "Time Started :" & Start_Time & vbCrLf _
& "Time Completed:" & Now & vbCrLf _
& "Your File is Open in word you may print it
now!"
End_Macro End_Text
End Sub ' Main

Michael

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Quiting Excel

Frank,

I have tried that maybe i'm putting it in the wrong spot.
Where would this statment go in this?
-----Original Message-----
Hi Michael
add the line
application.quit

--
Regards
Frank Kabel
Frankfurt, Germany

Michael Wise wrote:
After some other processes take place I wish to exit

the
excel application. I have pasted what code I have here

to
see where I go from here. Notice in the Close Excel
section i'm getting the excel file to close it just

will
not exit my application.


'-----------------
'Open word
Dim WordApp As Object
Set WordApp = CreateObject("Word.Application")
WordApp.Documents.Open "c:\PSV

Travelog\Travelog
Template.dot"
WordApp.Visible = True
WordApp.Documents("Travelog

Template.dot").Close
SaveChanges:=False

'-------------------
'Close Excel
Application.DisplayAlerts = False
Workbooks("PSV WO and Specs.xls").Close 'Close
Excel


'------------------
'Program Ending

' --- Do not modify ---
GoTo EndMain
Main_Err:
Main_Error_Handler

EndMain:

End_Text = "Macro Finished" & vbCrLf _
& "Time Started :" & Start_Time & vbCrLf _
& "Time Completed:" & Now & vbCrLf _
& "Your File is Open in word you may print it
now!"
End_Macro End_Text
End Sub ' Main

Michael

.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Quiting Excel

Hi
try

'-------------------
'Close Excel
Application.DisplayAlerts = False
Workbooks("PSV WO and Specs.xls").Close
application.quit

--
Regards
Frank Kabel
Frankfurt, Germany

Michael Wise wrote:
Frank,

I have tried that maybe i'm putting it in the wrong spot.
Where would this statment go in this?
-----Original Message-----
Hi Michael
add the line
application.quit

--
Regards
Frank Kabel
Frankfurt, Germany

Michael Wise wrote:
After some other processes take place I wish to exit the
excel application. I have pasted what code I have here to
see where I go from here. Notice in the Close Excel
section i'm getting the excel file to close it just will
not exit my application.


'-----------------
'Open word
Dim WordApp As Object
Set WordApp = CreateObject("Word.Application")
WordApp.Documents.Open "c:\PSV Travelog\Travelog
Template.dot"
WordApp.Visible = True
WordApp.Documents("Travelog Template.dot").Close
SaveChanges:=False

'-------------------
'Close Excel
Application.DisplayAlerts = False
Workbooks("PSV WO and Specs.xls").Close 'Close
Excel


'------------------
'Program Ending

' --- Do not modify ---
GoTo EndMain
Main_Err:
Main_Error_Handler

EndMain:

End_Text = "Macro Finished" & vbCrLf _
& "Time Started :" & Start_Time & vbCrLf _
& "Time Completed:" & Now & vbCrLf _
& "Your File is Open in word you may print it
now!"
End_Macro End_Text
End Sub ' Main

Michael

.

  #5   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Quiting Excel

Hmmm... Well thats where I thought it would go but its
only closing the file and leaving the excel application
open. Any other suggestions. BTW thanks for the time.
-----Original Message-----
Hi
try

'-------------------
'Close Excel
Application.DisplayAlerts = False
Workbooks("PSV WO and Specs.xls").Close
application.quit

--
Regards
Frank Kabel
Frankfurt, Germany

Michael Wise wrote:
Frank,

I have tried that maybe i'm putting it in the wrong

spot.
Where would this statment go in this?
-----Original Message-----
Hi Michael
add the line
application.quit

--
Regards
Frank Kabel
Frankfurt, Germany

Michael Wise wrote:
After some other processes take place I wish to exit

the
excel application. I have pasted what code I have

here to
see where I go from here. Notice in the Close Excel
section i'm getting the excel file to close it just

will
not exit my application.


'-----------------
'Open word
Dim WordApp As Object
Set WordApp = CreateObject("Word.Application")
WordApp.Documents.Open "c:\PSV

Travelog\Travelog
Template.dot"
WordApp.Visible = True
WordApp.Documents("Travelog

Template.dot").Close
SaveChanges:=False

'-------------------
'Close Excel
Application.DisplayAlerts = False
Workbooks("PSV WO and

Specs.xls").Close 'Close
Excel


'------------------
'Program Ending

' --- Do not modify ---
GoTo EndMain
Main_Err:
Main_Error_Handler

EndMain:

End_Text = "Macro Finished" & vbCrLf _
& "Time Started :" & Start_Time & vbCrLf _
& "Time Completed:" & Now & vbCrLf _
& "Your File is Open in word you may print it
now!"
End_Macro End_Text
End Sub ' Main

Michael
.

.

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



All times are GMT +1. The time now is 06:02 PM.

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"