Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Vba Excel - Checking if changes were made


Hi friends,
i hope somebody knows the right answer to this questions:

1.- Before closing the workbook, I need to know (programatically) if
any changes were made to it, something like..
Sub BeforeClosing()
If myWrkBk.ChangesWereMade = True then
'XXX
End if
End Sub

2.- My workbook (with the macro) is on the local server, and uses
several other worbooks too. when I try to open one of those several
workbooks it may be already open. Is there anyway i could know if that
workbook is already running in some place in the server?

Thanks in advance,
Aldo.


--
ajliaks
------------------------------------------------------------------------
ajliaks's Profile: http://www.excelforum.com/member.php...fo&userid=8196
View this thread: http://www.excelforum.com/showthread...hreadid=390474

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Vba Excel - Checking if changes were made

#1. You can check to see if excel thinks the workbook is "dirty" (needs
saving).
if mywkrbk.saved = true then
'no outstanding changes
else
'something could have changed since the last save
end if

#2. Take a look at this kb article:
http://support.microsoft.com?kbid=138621

If you don't need to make changes and save that other workbook, maybe you
could just open it readonly.

ajliaks wrote:

Hi friends,
i hope somebody knows the right answer to this questions:

1.- Before closing the workbook, I need to know (programatically) if
any changes were made to it, something like..
Sub BeforeClosing()
If myWrkBk.ChangesWereMade = True then
'XXX
End if
End Sub

2.- My workbook (with the macro) is on the local server, and uses
several other worbooks too. when I try to open one of those several
workbooks it may be already open. Is there anyway i could know if that
workbook is already running in some place in the server?

Thanks in advance,
Aldo.

--
ajliaks
------------------------------------------------------------------------
ajliaks's Profile: http://www.excelforum.com/member.php...fo&userid=8196
View this thread: http://www.excelforum.com/showthread...hreadid=390474


--

Dave Peterson
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
Why does Excel ask to save when no changes were made? Mike Excel Discussion (Misc queries) 4 January 16th 10 12:45 AM
Spell Checking with checking cell notes jfitzpat Excel Discussion (Misc queries) 0 August 8th 07 10:26 PM
why does excel ask to save changes when none have been made? tre6bor Excel Discussion (Misc queries) 2 October 31st 06 05:56 PM
I am using Excel and have made an error. Millie Irene Charts and Charting in Excel 1 February 16th 05 04:57 PM
Excel Saving and No changes made!! Ash Excel Programming 1 April 14th 04 10:29 AM


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

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"