Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I have a workbook with 18 sheets and most of the VBA used by the sheets is refereces to XLA files on the network. Before the application is closed I want to inform the user that the workbook is not saved if the user had forgotten to save the workbook. When I open the workbook the property ThisWorkbook.Saved = True, but as soon as I close the Workbook (1 second after opening) and catches the event Workbook_BeforeClose the property have been set to False...why??? I do not have any code in my project setting the property to False...does anyone know what to do? Best regards /Niklas |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Niklas,
from VBA help: Saved Property = True if no changes have been made to the specified workbook since it was last saved. Read/write Boolean Therefore, when you open your file and allow the links to update, a change has been made which sets the Saved property to False. In other words, you should be checking for .saved=false if you want to check the user hasn't forgotten. Pete |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I do not have any links. When I wrote refereces I meant that I have used Tools-Referencess... in the editor. The property Saved is True after I have opened my file. I catch the event Workbook_BeforeClose after I have done File-Close and in this event the Saved property is False. What made the property to be False? I only did an "Close"! Best regards /Niklas My question is: how can the workbook -----Original Message----- Niklas, from VBA help: Saved Property = True if no changes have been made to the specified workbook since it was last saved. Read/write Boolean Therefore, when you open your file and allow the links to update, a change has been made which sets the Saved property to False. In other words, you should be checking for .saved=false if you want to check the user hasn't forgotten. Pete . |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
There are other ways this can occur, such as with Volatile formulas that
recalculate frequently: XL: "Save Changes in <Bookname" Prompt Even If No Changes Are Made http://support.microsoft.com/default...b;EN-US;274500 So if you have volatile formulas, the saved property will be false immediately after opening because of recalculation, even if you don't touch the workbook. "Niklas" wrote in message ... Hi I do not have any links. When I wrote refereces I meant that I have used Tools-Referencess... in the editor. The property Saved is True after I have opened my file. I catch the event Workbook_BeforeClose after I have done File-Close and in this event the Saved property is False. What made the property to be False? I only did an "Close"! Best regards /Niklas My question is: how can the workbook -----Original Message----- Niklas, from VBA help: Saved Property = True if no changes have been made to the specified workbook since it was last saved. Read/write Boolean Therefore, when you open your file and allow the links to update, a change has been made which sets the Saved property to False. In other words, you should be checking for .saved=false if you want to check the user hasn't forgotten. Pete . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
lost work that wasn't saved. Can I retrieve it? How? | Excel Discussion (Misc queries) | |||
IF / VLOOKUP formula won't work until saved | Excel Worksheet Functions | |||
Can not work with saved files | Excel Discussion (Misc queries) | |||
How to get saved old saved work that was saved over? | Excel Discussion (Misc queries) | |||
VB controls don't work in web saved Excel workbook | Excel Programming |