hi all,
Can you tell me how can I programatically close active excel application???
thx in advance for your help
regards,
sweet_dreams
Printable View
hi all,
Can you tell me how can I programatically close active excel application???
thx in advance for your help
regards,
sweet_dreams
Well if you know the workbook's name:
Or if you send the Procedure the name:VB Code:
Sub CloseExcel() Application.Workbooks("Book2").Close End Sub
VB Code:
Sub CloseExcel(wb As Workbook) Application.Workbooks(wb.Name).Close End Sub
Hope this is what you were looking for :thumb:
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
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
I thought there was an easier way.
Glad to see you got it moving.