Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 486
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I need a formula to determine when the data was last changed Climber of Mtns[_2_] Excel Discussion (Misc queries) 0 December 4th 09 09:51 PM
How to determine if a cell's data has been changed aidans Excel Discussion (Misc queries) 3 February 13th 07 03:47 PM
How to save a worksheet seperately in addition to part of wrkbook Ron de Bruin Excel Discussion (Misc queries) 5 September 14th 06 07:57 PM
determine if a cell changed value Dave01 Excel Worksheet Functions 0 July 8th 05 04:49 PM
How can I determine which cell changed as a result of a calculati. Asaf Excel Worksheet Functions 6 February 15th 05 12:17 PM


All times are GMT +1. The time now is 01:39 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"