Whenever Macros are recorded in a workbook, Modules get created. These modules house the VBA Codes. So whenever Excel detects any module in a workbook it prompts you to enable macros even though there might not be any macros in he file.
Example: Sometimes we try our hand on Macros and then later delete these macros. Even though there are no Macros, Excel gives an Enable Macros prompt on opening the file because the file still houses the Module(s) (including Class Module(s) if any) which have not been removed. So if you are wondering why this popup when there are no macros? All you have to do is go to the VBA Screen (Alt+F11) right click the Module(s) and delete them; this will get rid of the Enable Macros prompt.
Note : Some people get the impression that this popup appears for macros have been used on the workbook in past. However this is not true as running macros from personal.xls or an addin or any other file will neither create VBA code (in sheets or modules) nor will it create new modules. Hence mere running of macros ona file will not result in ‘Enable Macros prompt’ when you open them.
No comments:
Post a Comment