Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 85
Default auto open, auto close

I use this to reset user's computer to original calculation setting. It
works (I think), but upon closing, it prompts you: "Do you want to save the
changes you made..." This occurs even if I just saved it. I wish to not
see this message. I am trying to tell it not to prompt me, but to no avail.
A novice user reluctant to NOT save his work will hit 'yes' (save) to this
message over and over upon closing and wonder what they are doing wrong.

Public origcalc As Integer

Sub Auto_Open()
If Application.Calculation = xlAutomatic Then
origcalc = 1
Else
origcalc = 0
End If
Application.Calculation = xlAutomatic
End Sub

Sub auto_close()
If origcalc = 1 Then
Else
Application.Calculation = xlManual
End If
Application.DisplayAlerts = False 'THIS IS WHAT DOESN'T WORK
End Sub

Thanks, Mike Allen


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default auto open, auto close

Mike,

Try

Sub auto_close()
If origcalc = 1 Then
Else
Application.Calculation = xlManual
End If
Thisworkbook.saved=true
End Sub


--

HTH

RP
(remove nothere from the email address if mailing direct)


"mike allen" wrote in message
...
I use this to reset user's computer to original calculation setting. It
works (I think), but upon closing, it prompts you: "Do you want to save

the
changes you made..." This occurs even if I just saved it. I wish to not
see this message. I am trying to tell it not to prompt me, but to no

avail.
A novice user reluctant to NOT save his work will hit 'yes' (save) to this
message over and over upon closing and wonder what they are doing wrong.

Public origcalc As Integer

Sub Auto_Open()
If Application.Calculation = xlAutomatic Then
origcalc = 1
Else
origcalc = 0
End If
Application.Calculation = xlAutomatic
End Sub

Sub auto_close()
If origcalc = 1 Then
Else
Application.Calculation = xlManual
End If
Application.DisplayAlerts = False 'THIS IS WHAT DOESN'T WORK
End Sub

Thanks, Mike Allen




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
Auto-Close Office User Excel Discussion (Misc queries) 2 April 12th 10 10:01 PM
Clear Auto Filter on Close (or open) Karin Excel Discussion (Misc queries) 3 August 23rd 07 06:16 PM
Auto Open, Refresh, Save, Close Jimmycooker Excel Discussion (Misc queries) 0 February 6th 06 01:34 PM
Auto open 8 workbooks in different folders, then save on close... pkley[_2_] Excel Programming 0 October 11th 04 11:37 PM
auto close while MsgBox is open Kevin Excel Programming 2 November 10th 03 12:36 AM


All times are GMT +1. The time now is 03:20 AM.

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

About Us

"It's about Microsoft Excel"