View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Sandy Sandy is offline
external usenet poster
 
Posts: 270
Default Prevent code running

Is there any way I can prevent the 'Workbook_BeforeClose' code module
running at the point where I have inserted the asterisks

Sub NewName()

Application.ScreenUpdating = False
Application.EnableEvents = False

'other code

ThisWorkbook.SaveCopyAs filename:="C:\Users\Sandy\Documents\NewBook.xls"

ThisWorkbook.Close SaveChanges:=False

************

Application.ScreenUpdating = True
Application.EnableEvents = True

End Sub

Thanks
Sandy