Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
XP XP is offline
external usenet poster
 
Posts: 389
Default Determine if template file is dirty

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.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Determine if template file is dirty

One way:

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

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


In article ,
XP 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
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
How do I determine if a workbook is a template? Clayman Excel Programming 2 July 6th 07 06:08 PM
Removing Dirty Data From an Imported DOS database Iain Scott[_2_] Excel Programming 2 July 24th 06 05:36 PM
Template track phone traffic to determine weekly, monthly trends. JKPierce New Users to Excel 0 April 6th 06 04:31 PM
using Dirty Method Giselle[_2_] Excel Programming 15 February 7th 06 01:21 AM
How to tell if a range or cell is dirty Carl Rapson Excel Programming 4 February 20th 04 05:09 PM


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

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

About Us

"It's about Microsoft Excel"