Get into the VB Editor. (Tools>Macros>VisualBasicEditor will do this for you, as will the Alt-F11 shortcut.)
Code associated with "Microsoft Excel Objects" (ie worksheets etc) has to be deleted explicitly, by selecting then deleting the lines of code.
Code in modules can be similarly deleted, but that leaves the module behind, and the module's presence will cause your enable/disable message to appear on opening. To delete the module itself (as well as its contents) right-click on the module's name where it appears on the right hand side of the screen, then select "Remove..." from the options offered.