PC Review


Reply
Thread Tools Rate Thread

Determine if template file is dirty

 
 
=?Utf-8?B?WFA=?=
Guest
Posts: n/a
 
      14th Aug 2007
Using Office 2003 and Windows XP;

I have an unsaved copy of a template file opened in memory; now I want to
control how the user exits. How can I determine if the file is dirty?

Note that I cannot use "If ThisWorkbook.Saved = True" because template
copies are never saved when they are first opened; what I need to know is
whether the user has made any changes;

Is there a neat and tidy command that will do this without having to code
checks against 30 controls looking for a change? Please answer, "Why yes
there is..." and then post example VBA. You help is greatly appreciated.

Thanks for your assistance.


 
Reply With Quote
 
 
 
 
JE McGimpsey
Guest
Posts: n/a
 
      14th Aug 2007
One way:

You can put this in the template's ThisWorkbook code module...

Private Sub Workbook_Open()
Me.Saved = True
End Sub


In article <F9C23BA7-0097-4124-96C0-(E-Mail Removed)>,
XP <(E-Mail Removed)> wrote:

> Using Office 2003 and Windows XP;
>
> I have an unsaved copy of a template file opened in memory; now I want to
> control how the user exits. How can I determine if the file is dirty?
>
> Note that I cannot use "If ThisWorkbook.Saved = True" because template
> copies are never saved when they are first opened; what I need to know is
> whether the user has made any changes;
>
> Is there a neat and tidy command that will do this without having to code
> checks against 30 controls looking for a change? Please answer, "Why yes
> there is..." and then post example VBA. You help is greatly appreciated.
>
> Thanks for your assistance.

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dirty, dirty ********* the X-rated picture guide Abarbarian General Discussion 0 25th Mar 2010 10:17 PM
excel sheet dirty read and dirty write? DAXU Microsoft Excel Programming 6 21st Feb 2008 12:03 PM
How do I determine if a workbook is a template? =?Utf-8?B?Q2xheW1hbg==?= Microsoft Excel Programming 2 6th Jul 2007 06:08 PM
detecting that a dirty form is no longer dirty Microsoft Access Form Coding 8 11th Aug 2004 11:41 AM
Best way to determine which field (ctrl on form is updated) when Form is dirty Marcel K. Microsoft Access Form Coding 2 20th Oct 2003 01:55 PM


Features
 

Advertising
 

Newsgroups
 


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