|
-
Nov 14th, 2005, 12:24 PM
#1
Thread Starter
Addicted Member
closing excel application
hi all,
Can you tell me how can I programatically close active excel application???
thx in advance for your help
regards,
sweet_dreams
Last edited by sweet_dreams; Nov 14th, 2005 at 12:59 PM.
-
Nov 14th, 2005, 12:32 PM
#2
Addicted Member
Re: closing excel application
Well if you know the workbook's name:
VB Code:
Sub CloseExcel()
Application.Workbooks("Book2").Close
End Sub
Or if you send the Procedure the name:
VB Code:
Sub CloseExcel(wb As Workbook)
Application.Workbooks(wb.Name).Close
End Sub
Hope this is what you were looking for
-
Nov 14th, 2005, 12:40 PM
#3
Addicted Member
Re: closing excel application
Oh yeah, and to close all workbooks (without saving)
VB Code:
Sub CloseExcel()
With Application
.EnableEvents = False
.Workbooks.Close
.EnableEvents = True
End With
End Sub
-
Nov 14th, 2005, 12:59 PM
#4
Thread Starter
Addicted Member
Re: closing excel application
thx malik641 but I was looking for something else. I was looking for something like that:
application.quite
code above closes whole excel application
but thx anyway
-
Nov 14th, 2005, 01:16 PM
#5
Addicted Member
Re: closing excel application
I thought there was an easier way.
Glad to see you got it moving.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|