ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel File Saving - not wanted (https://www.excelbanter.com/excel-programming/356608-excel-file-saving-not-wanted.html)

Paul Davidson

Excel File Saving - not wanted
 
I have a vbs script, opens a spreadsheet, reads some data and
uses that to launch some other scripts.

For a long time, it's worked just fine.
All of the sudden, after the script has read the data,
a dialog box pops up asking
"Do you want to save the changes..."

I've set the file to open read only.
I've set Display.Alerts=False

Neither one made any difference.

It didn't start doing this until a couple of weeks ago.
It's annoying, to say the least.

Note: The script is often run on PC's on which we're
RDC'd into. AND, the xls workbook is running in shared mode.

Any ideas, hints or suggestions ?

--
Paul Davidson


Gary Keramidas

Excel File Saving - not wanted
 
when you close the workbook, do you use something like this?

Workbooks(Filename).Close SaveChanges:=False

--


Gary


"Paul Davidson" wrote in message
...
I have a vbs script, opens a spreadsheet, reads some data and
uses that to launch some other scripts.

For a long time, it's worked just fine.
All of the sudden, after the script has read the data,
a dialog box pops up asking
"Do you want to save the changes..."

I've set the file to open read only.
I've set Display.Alerts=False

Neither one made any difference.

It didn't start doing this until a couple of weeks ago.
It's annoying, to say the least.

Note: The script is often run on PC's on which we're
RDC'd into. AND, the xls workbook is running in shared mode.

Any ideas, hints or suggestions ?

--
Paul Davidson




Paul Davidson

Excel File Saving - not wanted
 
Gary:

Thanks for the reply.
Shortly after posting this msg,
I added that line to my code and voila it worked great.

I still don't understand why the behavior suddenly changed,
but then again, IT has a way pushing things on us without
alerting us.

--
TIA
Paul Davidson



"Gary Keramidas" wrote:

when you close the workbook, do you use something like this?

Workbooks(Filename).Close SaveChanges:=False

--


Gary


"Paul Davidson" wrote in message
...
I have a vbs script, opens a spreadsheet, reads some data and
uses that to launch some other scripts.

For a long time, it's worked just fine.
All of the sudden, after the script has read the data,
a dialog box pops up asking
"Do you want to save the changes..."

I've set the file to open read only.
I've set Display.Alerts=False

Neither one made any difference.

It didn't start doing this until a couple of weeks ago.
It's annoying, to say the least.

Note: The script is often run on PC's on which we're
RDC'd into. AND, the xls workbook is running in shared mode.

Any ideas, hints or suggestions ?

--
Paul Davidson






All times are GMT +1. The time now is 09:36 PM.

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