B
Brian Matlack
Hi!
If I have a drawn button and assign a macro that looks like this:
[Begin Code]
Sub ExitWarrantybook()
Application.ScreenUpdating = False
ActiveWorkbook.Save
Sheets("Home Page").Select
Range("H26").Select
Selection.ClearContents
ActiveWorkbook.Close
ActiveWorkbook.Saved = True
Application.ScreenUpdating = True
End Sub
[end Code]
And I have code in the "ThisWorkbook" section that looks like this:
[begin code]
Sub Workbook_BeforeClose(Cancel As Boolean)
Application.ScreenUpdating = False
ActiveWorkbook.Save
ActiveWorkbook.Saved = True
With ActiveWindow
..DisplayHeadings = True
..DisplayOutline = True
..DisplayWorkbookTabs = True
End With
Application.ScreenUpdating = True
End Sub
[end code]
Do both sets of code run before the workbook closes?
If I have a drawn button and assign a macro that looks like this:
[Begin Code]
Sub ExitWarrantybook()
Application.ScreenUpdating = False
ActiveWorkbook.Save
Sheets("Home Page").Select
Range("H26").Select
Selection.ClearContents
ActiveWorkbook.Close
ActiveWorkbook.Saved = True
Application.ScreenUpdating = True
End Sub
[end Code]
And I have code in the "ThisWorkbook" section that looks like this:
[begin code]
Sub Workbook_BeforeClose(Cancel As Boolean)
Application.ScreenUpdating = False
ActiveWorkbook.Save
ActiveWorkbook.Saved = True
With ActiveWindow
..DisplayHeadings = True
..DisplayOutline = True
..DisplayWorkbookTabs = True
End With
Application.ScreenUpdating = True
End Sub
[end code]
Do both sets of code run before the workbook closes?