View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Kari J Keinonen[_2_] Kari J Keinonen[_2_] is offline
external usenet poster
 
Posts: 20
Default Addin close command not working in new workbook

Hi!

I'm not sure what you need, but try this one.

Private Sub workbook_beforeclose(cancel As Boolean)
Application.DisplayAlerts = False
Workbooks("YourWorkbookName").Sheets("What If").Delete
Application.DisplayAlerts = True
ActiveWorkbook.Save
End Sub

Regards,
Kari J Keinonen