"Mike H" wrote:
> "Erik Wikström" wrote:
>
> > I have a workbook where on one sheet the user can use a set of buttons and
> > dialogues to add new column headers to a table and then fill in the correct
> > default values for each row in that column. The headers shown are stored in
> > an internal datastructure and to ease insertion of new headers (which might
> > be inserted in the middle of the table) I have written code that first clears
> > all headers and then re-draws them whenever the user adds new headers. This
> > code is also run when the user opens the workbook.
> >
> > The problem with this is that Excel counts this re-drawing (even if no
> > change is made) as changing the workbook, so if I just open the book and then
> > try to close it Excel asks if I want to save since the book has been changed.
> > So I wonder if it is possible to tell Excel to ignore changed to certain rows
> > when determining if the workbook has been changed.
> >
> Hi,
>
> You could do this:-
>
> Private Sub Workbook_Open()
> 'Make your changes to headers etc
> ActiveWorkbook.Saved = True
> End Sub
>
> Only changes made after the line
> ActiveWorkbook.Saved = True
> Should generate a prompt to save changes when closing.
Hmm, that might work. Thanks.
|