Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Auto-Close | Excel Discussion (Misc queries) | |||
Clear Auto Filter on Close (or open) | Excel Discussion (Misc queries) | |||
Auto Open, Refresh, Save, Close | Excel Discussion (Misc queries) | |||
Auto open 8 workbooks in different folders, then save on close... | Excel Programming | |||
auto close while MsgBox is open | Excel Programming |