![]() |
Help with closing down a workbook??
First off....if this turns into a double post, I apologize....I tried to post
this about an hour ago but something messed up and I really don't think it went through. Project: I've got a workbook...7 sheets...only one that is available (easily) to the operator. This operator sees the opening page and clicks on one of several macro'd buttons....that takes him a data entry sheet and a data-form opens....when the data is entered, he/she closes the data-form and the macro prints the page, erases the entered data and returns to the opening page. I've used an open workbook module to get rid of the tabs, formula bars, etc, so, unless he/she knows Excel fairly well, it'd be a little difficult for them to corrupt the programming. I've also incorporated a before_closing module, which resets the formula bars, tabs, etc...then closes the program... Problem: There is no need ever for the operator to save this workbook...but I found that when it goes into the close routine, the standard window "do you want to save changes" pops up.....and if you hit cancel at that point the book stays open and all the formula bars, tabs, etc are now active. Question: Is there a way to bypass that "save" window? Thanks in advance and again, if this is double posted, I do apologize, Have a great day, |
Put this code in the ThisWorkbook code module:
Private Sub Workbook_BeforeClose(Cancel As Boolean) Saved = True End Sub -- Vasant "Don" wrote in message ... First off....if this turns into a double post, I apologize....I tried to post this about an hour ago but something messed up and I really don't think it went through. Project: I've got a workbook...7 sheets...only one that is available (easily) to the operator. This operator sees the opening page and clicks on one of several macro'd buttons....that takes him a data entry sheet and a data-form opens....when the data is entered, he/she closes the data-form and the macro prints the page, erases the entered data and returns to the opening page. I've used an open workbook module to get rid of the tabs, formula bars, etc, so, unless he/she knows Excel fairly well, it'd be a little difficult for them to corrupt the programming. I've also incorporated a before_closing module, which resets the formula bars, tabs, etc...then closes the program... Problem: There is no need ever for the operator to save this workbook...but I found that when it goes into the close routine, the standard window "do you want to save changes" pops up.....and if you hit cancel at that point the book stays open and all the formula bars, tabs, etc are now active. Question: Is there a way to bypass that "save" window? Thanks in advance and again, if this is double posted, I do apologize, Have a great day, |
All times are GMT +1. The time now is 12:28 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com