Charles Bushby
New Member
- Joined
- Aug 10, 2005
- Messages
- 42
When I open an excel file the workbook open event runs code to disable cut, copy and paste and hides the formula bar. When the file is closed I wish to enable cut, copy and paste and show the formula bar. I have tried the following code but it doesn't work. Does anyone know how to write code to make it work?
Private Sub Workbook_BeforeClose(Cancel As Boolean)
If Cancel = True Then
Call EnableCutAndPaste
Application.DisplayFormulaBar = True
ElseIf Cancel = False Then
Call DisableCutAndPaste
Application.DisplayFormulaBar = False
End If
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
If Cancel = True Then
Call EnableCutAndPaste
Application.DisplayFormulaBar = True
ElseIf Cancel = False Then
Call DisableCutAndPaste
Application.DisplayFormulaBar = False
End If
End Sub