Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Turn DisplayAlerts Back On

Status
Not open for further replies.

PhilH123

Programmer
Nov 22, 2004
24
GB
Hi All,

I'm sure someone will know how to do this and make me feel really stupid!!

I have an Excel spreadsheet which is to be used as a questionnaire. I hide all toolbars, tabs etc; and turn off alerts.

The thing is I don't want to get the save changes message up when the user closes the application - all data is output to a text file before this stage is reached - but as this will be sent to many different users I don't want to leave any Alerts turned off!

Can someone please help?

Thanks in advance.
Phil.

 
And I have just found that DisplayAlerts doesn't affect this anyway, so my problem has just gone sideways!!!

Phil.
 
Have you tried this ?
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.DisplayAlerts = True
Me.Saved = True
End Sub

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
PH,

I still get asked the question, even though I have added 'Me.Saved = True' as the last statement in the BeforeClose event!!

Thanks for the idea though, I'm sure this approach has got to be in the right direction.

Phil.

 
PH,

Ignore my last post - I forgot to take an Exit statement out!!

This works great.

Thanks again,
Phil.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top