Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 270
Default Closing application problem

Hi,
Excel 2007 - Two simple macros.
(I would suggest trying these out).

Private Sub Workbook_Open()

Application.DisplayFullScreen = True
Application.DisplayFormulaBar = False

End Sub

Private Sub Workbook_BeforeClose(cancel As Boolean)

Application.DisplayFullScreen = False
Application.DisplayFormulaBar = True

End Sub

The problem is that when a change has been made to the workbook and the user
clicks cancel when the save dialog appears there is then no option to close
down the application.

Is there any way to force the entire application window to be viewed in
order that the close button can be selected.

Sandy

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Closing application problem

Try it,


Private Sub Workbook_BeforeClose(cancel As Boolean)
If Not ActiveWorkbook.Saved Then
If (MsgBox("Save the work?", vbYesNo)) = 6 Then
ActiveWorkbook.Save
Else
ActiveWorkbook.Saved = True
End If
Application.DisplayFullScreen = False
Application.DisplayFormulaBar = True
End If
End Sub




"Sandy" escreveu na mensagem
...
Hi,
Excel 2007 - Two simple macros.
(I would suggest trying these out).

Private Sub Workbook_Open()

Application.DisplayFullScreen = True
Application.DisplayFormulaBar = False

End Sub

Private Sub Workbook_BeforeClose(cancel As Boolean)

Application.DisplayFullScreen = False
Application.DisplayFormulaBar = True

End Sub

The problem is that when a change has been made to the workbook and the
user clicks cancel when the save dialog appears there is then no option to
close down the application.

Is there any way to force the entire application window to be viewed in
order that the close button can be selected.

Sandy





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 270
Default Closing application problem

Hi Clarindo
This certainly takes the 'Cancel' aspect out of the options.
Thank you it works well.
Sandy

"Clarindo" wrote in message
...
Try it,


Private Sub Workbook_BeforeClose(cancel As Boolean)
If Not ActiveWorkbook.Saved Then
If (MsgBox("Save the work?", vbYesNo)) = 6 Then
ActiveWorkbook.Save
Else
ActiveWorkbook.Saved = True
End If
Application.DisplayFullScreen = False
Application.DisplayFormulaBar = True
End If
End Sub




"Sandy" escreveu na mensagem
...
Hi,
Excel 2007 - Two simple macros.
(I would suggest trying these out).

Private Sub Workbook_Open()

Application.DisplayFullScreen = True
Application.DisplayFormulaBar = False

End Sub

Private Sub Workbook_BeforeClose(cancel As Boolean)

Application.DisplayFullScreen = False
Application.DisplayFormulaBar = True

End Sub

The problem is that when a change has been made to the workbook and the
user clicks cancel when the save dialog appears there is then no option
to
close down the application.

Is there any way to force the entire application window to be viewed in
order that the close button can be selected.

Sandy





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
closing the application Tigger Excel Discussion (Misc queries) 1 September 24th 08 04:26 PM
Closing Excel Application Inthi Excel Programming 1 October 18th 05 12:27 PM
closing an excel application Joseph Franchina Excel Programming 4 June 3rd 04 07:26 PM
More help on closing Excel.Application Snedker[_2_] Excel Programming 4 December 29th 03 01:04 PM
Problem with closing the excel application guhan Excel Programming 1 August 20th 03 01:56 PM


All times are GMT +1. The time now is 01:21 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"