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)
|