View Single Post
  #2 (permalink)  
Old 12-07-03, 20:28
RickKnight RickKnight is offline
Registered User
 
Join Date: Sep 2003
Location: Cincinnati, Oh USA
Posts: 203
Re: Closing Excel with Visual Basic

Use a macro:

Sub CloseIt()

' Keyboard Shortcut: Ctrl+q
'
ActiveWorkbook****nAutoMacros Which:=xlAutoClose
End Sub


Quote:
Originally posted by John Allen
Hi All , This is going to sound really silly to all you experts out there...
but what is the correct command to use for closing Excel with Visual basic. I am new to VB and am using a book with writen examples , but , the example shows the following:

xlsApp.Workbooks.Close
xlsApp.Quit


This does close the workbook , but not the application.?
Any suggestions.
regards
John Allen
(Newbie)
__________________
Rick Knight
KnightShift Office Solutions and Horse Breaking
VB, VBA, FileMaker, Access Solutions, Web Solutions
Reply With Quote