Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Determine whether a wrkbook have been changed since the last save
I have splitted a very large and complex workbook in three seperate parts. To
navigate between the different workbooks I created a new workbook with four buttons "Open file A", "Open file B", "Open file C" and "Exit" So far I managed to ask the user if he wants to save the file he is leaving before opening the other. E.g. User opens File A, makes some changes and selects File B for opening. A little form asks him if he wants to save the changes he made to File A. According to his answer File A is saved or not, and File B is opened. So far so good. But now I want the little Save-Yes/No form only to appear if he made changes to the File A. How do I determine whether he made changes to the file or not? Thanks in advance, Henk |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Determine whether a wrkbook have been changed since the last save
Without seeing any code it is hard to give you any specific code. There is a
saved property with a workbook which is set to false when a change is made. Sub test() Dim wbkA As Workbook Set wbkA = Workbooks("File A.xls") MsgBox wbkA.Saved End Sub -- HTH... Jim Thomlinson "Henk Frigge" wrote: I have splitted a very large and complex workbook in three seperate parts. To navigate between the different workbooks I created a new workbook with four buttons "Open file A", "Open file B", "Open file C" and "Exit" So far I managed to ask the user if he wants to save the file he is leaving before opening the other. E.g. User opens File A, makes some changes and selects File B for opening. A little form asks him if he wants to save the changes he made to File A. According to his answer File A is saved or not, and File B is opened. So far so good. But now I want the little Save-Yes/No form only to appear if he made changes to the File A. How do I determine whether he made changes to the file or not? Thanks in advance, Henk |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Determine whether a wrkbook have been changed since the last s
Jim,
Thanks for your prompt answer. Your code indeed generates the information I am looking for. I would like to create something like this : Dim bk2 As Workbook Set bk2 = Workbooks("Wniq Zyprexa forecast B.xls") If bk.Save = True Then Workbooks("Wniq Zyprexa forecast B.xls").Close SaveChanges:=False Else Switch_Module_1.Show End If This code results in a compile error : Expected function or variable. Thanks, Henk Frigge "Jim Thomlinson" wrote: Without seeing any code it is hard to give you any specific code. There is a saved property with a workbook which is set to false when a change is made. Sub test() Dim wbkA As Workbook Set wbkA = Workbooks("File A.xls") MsgBox wbkA.Saved End Sub -- HTH... Jim Thomlinson "Henk Frigge" wrote: I have splitted a very large and complex workbook in three seperate parts. To navigate between the different workbooks I created a new workbook with four buttons "Open file A", "Open file B", "Open file C" and "Exit" So far I managed to ask the user if he wants to save the file he is leaving before opening the other. E.g. User opens File A, makes some changes and selects File B for opening. A little form asks him if he wants to save the changes he made to File A. According to his answer File A is saved or not, and File B is opened. So far so good. But now I want the little Save-Yes/No form only to appear if he made changes to the File A. How do I determine whether he made changes to the file or not? Thanks in advance, Henk |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
I need a formula to determine when the data was last changed | Excel Discussion (Misc queries) | |||
How to determine if a cell's data has been changed | Excel Discussion (Misc queries) | |||
How to save a worksheet seperately in addition to part of wrkbook | Excel Discussion (Misc queries) | |||
determine if a cell changed value | Excel Worksheet Functions | |||
How can I determine which cell changed as a result of a calculati. | Excel Worksheet Functions |