ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to not show save dialog after reading from excel file. (https://www.excelbanter.com/excel-programming/353192-how-not-show-save-dialog-after-reading-excel-file.html)

philg1984

How to not show save dialog after reading from excel file.
 
I am working on a project where around 15000 excel files will be opened,
values read from them and then closed using Visual C Sharp 2005. I have the
problem that when the workbooks are closed they are opening a save/save as
file dialogue box. Obviously i do not want to sit there for 15000 files and
press this. Any ideas how to disable it? Thanks

sebastienm

How to not show save dialog after reading from excel file.
 
Hi,
Try closing the file by explicitely saying 'No Save', in vba ity would be:

DIm wkb as workbook
...
wkb.Save False 'False meaning 'do not save'
Set wkb = Nothing

If that doesn't work, prior to closing, you could try setting the Saved
property to true.
Wkb.Saved = True 'meaning the book is not dirty.

I hope this helps,
--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"philg1984" wrote:

I am working on a project where around 15000 excel files will be opened,
values read from them and then closed using Visual C Sharp 2005. I have the
problem that when the workbooks are closed they are opening a save/save as
file dialogue box. Obviously i do not want to sit there for 15000 files and
press this. Any ideas how to disable it? Thanks



All times are GMT +1. The time now is 08:16 AM.

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