Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default saveAS AfterUpdate


In excel if you open a workbook and change anything then you are
prompted with the save work when workbook ic closed. How can i
reference whether a book has been ammended or updated so that i can
diplay the saveAs dialog box instead in order to create audit trail.

What i really want is something along lines of

if workbook has changed/updated/ammended whatever then
application.dialogs.SAVEAS ETC

else
close
end if

This code will be activated from within a bigger piece of code that
follows a number of criteria to decide whether to paste a new set of
values in the worksheet


--
cereldine
------------------------------------------------------------------------
cereldine's Profile: http://www.excelforum.com/member.php...o&userid=32069
View this thread: http://www.excelforum.com/showthread...hreadid=538044

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default saveAS AfterUpdate

check the Saved property of the workbook

if not ActiveWorkbook.Saved then
fname = Application.GetSaveAsFileName()
Activeworkbook.SaveAs fname
end if

--
Regards,
Tom Ogilvy


"cereldine" wrote:


In excel if you open a workbook and change anything then you are
prompted with the save work when workbook ic closed. How can i
reference whether a book has been ammended or updated so that i can
diplay the saveAs dialog box instead in order to create audit trail.

What i really want is something along lines of

if workbook has changed/updated/ammended whatever then
application.dialogs.SAVEAS ETC

else
close
end if

This code will be activated from within a bigger piece of code that
follows a number of criteria to decide whether to paste a new set of
values in the worksheet


--
cereldine
------------------------------------------------------------------------
cereldine's Profile: http://www.excelforum.com/member.php...o&userid=32069
View this thread: http://www.excelforum.com/showthread...hreadid=538044


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default saveAS AfterUpdate

Hi Cereldine,

thisworkbook.saved returns you information if any change (including
updating links) was done in the workbook since opening/last saving it.

Regards,
Ivan

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
Msgbox delayed using AFTERUPDATE No spam please Excel Programming 0 February 11th 05 10:52 PM
Msgbox delayed using AFTERUPDATE No spam please Excel Programming 1 February 10th 05 01:02 PM
TextBox on a UserForm -- AfterUpdate Stephen Knapp Excel Programming 2 November 24th 04 07:26 PM
AfterUpdate bforster1[_26_] Excel Programming 1 November 6th 04 07:16 PM
VBA - AfterUpdate TextBox bforster1[_23_] Excel Programming 0 November 5th 04 08:09 PM


All times are GMT +1. The time now is 12:11 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"