ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Automatically OPENing (GetObject) and Closing EXCEL via VB calls (https://www.excelbanter.com/excel-programming/442882-re-automatically-opening-getobject-closing-excel-via-vbulletin-calls.html)

XP

Automatically OPENing (GetObject) and Closing EXCEL via VB calls
 
Try:

To your Excel object append: Application.DisplayAlerts = False

Also, to close without a message, save first then use:
oWorkbook.Close SaveChanges:=False

HTH

"Brian E McNamee" wrote:

What is the calling sequence from VB to "Set gobjEXCELWorkBook =
GetObject(pzExcelFileName)" and "gobjEXCELWorkBook.Close" an EXCEL
Application witout having to answer dialogs about "Different Format" or "Save
Changes". This consumes a lot of time and repetitiveness when you're going
through 50 - 100 worbooks!
--
Brian McNamee



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com