I've writtenamacro in my whose purpose is to ask me, when I try to close thefile, whetheror not all tasks have been completed within that specificfile. Rather than addthis to the numerous excel files I get into each day, I'dlike to add it to mypersonal workbook. The problem I’m having is that thespecific code only workswhen I store the code in each unique file, as opposedto my personal workbook.Any recommendations on how to do this?
Code:
[COLOR=#222222][FONT=Verdana]Private Sub Workbook_BeforeClose(Cancel As Boolean) [/FONT][/COLOR]
[COLOR=#222222][FONT=Verdana]Dim ans AsVbMsgBoxResult [/FONT][/COLOR]
[COLOR=#222222][FONT=Verdana]ans =MsgBox("Are you sure you have done everything", vbYesNo + vbQuestion)[/FONT][/COLOR]
[COLOR=#222222][FONT=Verdana]If ans = vbNoThen Cancel = True[/FONT][/COLOR]
[COLOR=#222222][FONT=Verdana]End Sub[/FONT][/COLOR]