moogthemoog
Board Regular
- Joined
- Nov 17, 2004
- Messages
- 51
Hi
I'm using code so that when a workbook is read only, it treats it as saved, so the Save prompt doesn't come up. This is in in BeforeClose event.
However, if a user opens the spreadsheet (as read only) and does work in it, without bearing in mind it's only read only, then it would not come up with a prompt to save.
Some processes seem to run (I think it's Conditional Formatting) when opening the file, that mean the spreadsheet always thinks there's something to save.
What I would like to know, therefore, is if there is a open event that will trigger when the workbook is opened, but after the automated processes finish, so that I can put a Me.Saved = True line in? Or even, in the BeforeClose event, if there's something that can differentiate between user-activated changes, or the spreadsheet-originated changes.
Obviously, I can just switch off this code, but I'm trying to eliminate unnecessary prompts to save.
Thanks
Jon
I'm using code so that when a workbook is read only, it treats it as saved, so the Save prompt doesn't come up. This is in in BeforeClose event.
However, if a user opens the spreadsheet (as read only) and does work in it, without bearing in mind it's only read only, then it would not come up with a prompt to save.
Some processes seem to run (I think it's Conditional Formatting) when opening the file, that mean the spreadsheet always thinks there's something to save.
What I would like to know, therefore, is if there is a open event that will trigger when the workbook is opened, but after the automated processes finish, so that I can put a Me.Saved = True line in? Or even, in the BeforeClose event, if there's something that can differentiate between user-activated changes, or the spreadsheet-originated changes.
Code:
Private Sub Workbook_beforeclose(cancel As Boolean)
If ActiveWorkbook.ReadOnly = False Then GoTo 50
Me.Saved = True
Exit Sub
50: 'Etc
End Sub
Obviously, I can just switch off this code, but I'm trying to eliminate unnecessary prompts to save.
Thanks
Jon
Last edited: