Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
When i close a workbook through code such as :
sub button6() Application.DisplayAlerts = False ActiveWorkbook.Save ActiveWorkbook.Close Application.DisplayAlerts = True End Sub and Private Sub Workbook_BeforeClose(Cancel As Boolean) On Error Resume Next Dim WB As Workbook For Each WB In Application.Workbooks Debug.Print WB.Name If WB.Name < ThisWorkbook.Name Then If WB.Windows(1).Visible = True Then Exit Sub End If Next Sheets("Navigation Sheet").Select Application.Quit End Sub I get an ERROR, prompts me to \send report to MS or not. If i open Excel and a blank sheet and then exit excel i get No error, so it seem to be ONLY when exiting via code. How do i fix this? Corey.... |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Why doesn't Excel 2007 record charting and office art macro code? | Excel Discussion (Misc queries) | |||
How to code on Macro on saving and closing a file? | Excel Worksheet Functions | |||
CLosing Excel 2007 with personal macro workbook | Excel Discussion (Misc queries) | |||
Macro Code for closing excel... | Excel Programming | |||
Changing VBE WS-component name in code craches excel 97 | Excel Programming |